Aktualizovat zezidock.py
This commit is contained in:
+5
-6
@@ -10,7 +10,7 @@ def root_check():
|
||||
sys.exit()
|
||||
|
||||
def first_run():
|
||||
print('This script will automatically install Dockhand on your system. Make sure you:')
|
||||
print('This script will automatically install Docker on your system. Make sure you:')
|
||||
print('1) Have Debian 11+ installed.')
|
||||
print('2) Are running this script as a user with sudo privileges.')
|
||||
uinput = input('Continue? [Y/N]: ')
|
||||
@@ -32,6 +32,8 @@ def docker_install():
|
||||
os.system('sudo apt update')
|
||||
os.system('sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y')
|
||||
os.system(f'mkdir {DOCKERDIR}')
|
||||
print("Docker installed!")
|
||||
print("")
|
||||
|
||||
def service_install(service):
|
||||
os.system(f'cp -r {ZEZIDIR}/zezidock/{service} {DOCKERDIR}')
|
||||
@@ -51,6 +53,7 @@ def service_install(service):
|
||||
os.system('sudo docker compose up -d')
|
||||
os.chdir(f'{ZEZIDIR}')
|
||||
print(f'Success! {service} is running!')
|
||||
print("")
|
||||
|
||||
def main():
|
||||
root_check()
|
||||
@@ -58,7 +61,7 @@ def main():
|
||||
if not os.path.exists(DOCKERDIR):
|
||||
first_run()
|
||||
|
||||
uinput = input("Docker installed! Do you want to install some containers? [Y/N]: ")
|
||||
uinput = input("Do you want to install some containers? [Y/N]: ")
|
||||
if uinput.lower() == "y":
|
||||
print("Caddy is an open-source web server that automatically manages HTTPS with Let's Encrypt and makes it easy to configure sites using simple, human-friendly syntax.")
|
||||
uinput = input("Do you want to install Caddy? [Y/N]: ")
|
||||
@@ -70,19 +73,15 @@ def main():
|
||||
if uinput.lower() == "y":
|
||||
service_install('dockhand')
|
||||
|
||||
|
||||
print("Gitea is an open-source self-hosted Git service for hosting repositories, managing issues and pull requests, and providing web-based collaboration.")
|
||||
uinput = input("Do you want to install Gitea? [Y/N]: ")
|
||||
if uinput.lower() == "y":
|
||||
service_install('gitea')
|
||||
|
||||
|
||||
print("Nextcloud is an open-source self-hosted platform for syncing and sharing files with collaboration tools like calendars, contacts, and document editing.")
|
||||
uinput = input("Do you want to install Nextcloud? [Y/N]: ")
|
||||
if uinput.lower() == "y":
|
||||
service_install('nextcloud')
|
||||
|
||||
|
||||
else:
|
||||
sys.exit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user