much cleanup

This commit is contained in:
Lee
2024-01-15 22:59:08 +00:00
parent 23852729c1
commit 7b83facc21
8 changed files with 247 additions and 155 deletions

18
src/utils/dockerUtils.py Normal file
View File

@ -0,0 +1,18 @@
import subprocess
import os
containerName = "traefik"
if os.environ.get("CONTAINER_NAME"):
containerName = os.environ.get("CONTAINER_NAME")
def restartTraefik():
# Check if we're in Windows, if so, don't restart Traefik
if os.name == "nt":
print("Restarting Traefik is not supported on Windows.")
return
print("Restarting Traefik, please wait this can take a while...")
# Restart Traefik in the base directory
subprocess.run(["docker", "restart", containerName])
print("Done!")