first commit

This commit is contained in:
2026-07-09 22:32:33 +02:00
parent 1ad7504bbe
commit 4ff8c6c627
3 changed files with 111 additions and 15 deletions
+24 -15
View File
@@ -11,9 +11,8 @@ def root_check():
def first_run():
print('This script will automatically install Dockhand 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('')
uinput = input('Continue? [Y/N]: ')
if uinput.lower() != "y":
sys.exit()
@@ -48,7 +47,6 @@ def service_install(service):
webui = input(f'[{service.upper()}] Choose port for Web UI: ')
os.system(f"sudo sed -i \"s|\\[WEBUI\\]|{webui}|g\" {DOCKERDIR}/{service}/docker-compose.yml")
def service_run(service):
os.chdir(f'{DOCKERDIR}/{service}')
os.system('sudo docker compose up -d')
os.chdir(f'{ZEZIDIR}')
@@ -60,21 +58,32 @@ def main():
if not os.path.exists(DOCKERDIR):
first_run()
if not os.path.exists(f'{DOCKERDIR}/dockhand/docker-compose.yml'):
service_install('dockhand')
uinput = input("Docker installed! 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 Lets Encrypt and makes it easy to configure sites using simple, human-friendly syntax.")
uinput = input("Do you want to install Caddy? [Y/N]: ")
if uinput.lower() == "y":
service_install('caddy')
if not os.path.exists(f'{DOCKERDIR}/caddy/docker-compose.yml'):
service_install('caddy')
print("Dockhand is a self-hosted Docker management web app that lets you control containers and Compose stacks across local and remote hosts with features like real-time logs, terminal access, and automation.")
uinput = input("Do you want to install Dockhand? [Y/N]: ")
if uinput.lower() == "y":
service_install('dockhand')
if not os.path.exists(f'{DOCKERDIR}/gitea/docker-compose.yml'):
service_install('gitea')
if not os.path.exists(f'{DOCKERDIR}/nextcloud/docker-compose.yml'):
service_install('nextcloud')
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')
service_run('dockhand')
service_run('caddy')
service_run('gitea')
service_run('nextcloud')
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()
main()