Aktualizovat zezidock.py

This commit is contained in:
2026-07-10 08:04:50 +00:00
parent 1acd1b01f7
commit 58043a9bb8
+5 -6
View File
@@ -10,7 +10,7 @@ def root_check():
sys.exit() sys.exit()
def first_run(): 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('1) Have Debian 11+ installed.')
print('2) Are running this script as a user with sudo privileges.') print('2) Are running this script as a user with sudo privileges.')
uinput = input('Continue? [Y/N]: ') uinput = input('Continue? [Y/N]: ')
@@ -32,6 +32,8 @@ def docker_install():
os.system('sudo apt update') 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('sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y')
os.system(f'mkdir {DOCKERDIR}') os.system(f'mkdir {DOCKERDIR}')
print("Docker installed!")
print("")
def service_install(service): def service_install(service):
os.system(f'cp -r {ZEZIDIR}/zezidock/{service} {DOCKERDIR}') 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.system('sudo docker compose up -d')
os.chdir(f'{ZEZIDIR}') os.chdir(f'{ZEZIDIR}')
print(f'Success! {service} is running!') print(f'Success! {service} is running!')
print("")
def main(): def main():
root_check() root_check()
@@ -58,7 +61,7 @@ def main():
if not os.path.exists(DOCKERDIR): if not os.path.exists(DOCKERDIR):
first_run() 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": 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.") 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]: ") uinput = input("Do you want to install Caddy? [Y/N]: ")
@@ -70,19 +73,15 @@ def main():
if uinput.lower() == "y": if uinput.lower() == "y":
service_install('dockhand') 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.") 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]: ") uinput = input("Do you want to install Gitea? [Y/N]: ")
if uinput.lower() == "y": if uinput.lower() == "y":
service_install('gitea') 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.") 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]: ") uinput = input("Do you want to install Nextcloud? [Y/N]: ")
if uinput.lower() == "y": if uinput.lower() == "y":
service_install('nextcloud') service_install('nextcloud')
else: else:
sys.exit() sys.exit()