Update 'docker_update.py'

This commit is contained in:
quackerd 2022-12-06 03:57:34 +00:00
parent dea05505de
commit 9642071b41

View File

@ -21,11 +21,11 @@ for line in lines:
if s.startswith("#"): if s.startswith("#"):
continue continue
fullpath = os.path.join(path, s) fullpath = os.path.join(path, s)
if os.path.isdir(fullpath) and ("docker-compose.yml" in os.listdir(fullpath)): if os.path.isdir(fullpath) and ("docker compose.yml" in os.listdir(fullpath)):
fullpath = os.path.join(fullpath, "docker-compose.yml") fullpath = os.path.join(fullpath, "docker compose.yml")
print("========= Processing " + fullpath + " =========") print("========= Processing " + fullpath + " =========")
print(subprocess.check_output("docker-compose -f " + fullpath + " pull", shell=True, stderr=subprocess.STDOUT).decode()) print(subprocess.check_output("docker compose -f " + fullpath + " pull", shell=True, stderr=subprocess.STDOUT).decode())
print(subprocess.check_output("docker-compose -f " + fullpath + " up -d", shell=True, stderr=subprocess.STDOUT).decode()) print(subprocess.check_output("docker compose -f " + fullpath + " up -d", shell=True, stderr=subprocess.STDOUT).decode())
else: else:
print("========= Skipping " + fullpath + ": invalid dir or docker-compos.yml =========") print("========= Skipping " + fullpath + ": invalid dir or docker-compos.yml =========")