fix
This commit is contained in:
parent
67ab03227a
commit
8853542182
7
main.py
7
main.py
@ -83,10 +83,9 @@ while True:
|
||||
updated = True
|
||||
if updated:
|
||||
if os.getenv("STAGE") == "development":
|
||||
container_id_run = call(f"echo $(docker ps -q -f name=infra-development_nginx)")
|
||||
result = call(f"docker restart {container_id_run.out}")
|
||||
container_id_run = call(f"echo $(docker ps -q -f name=infra-development_nginx)").out
|
||||
else:
|
||||
result = call("docker service update --force infra_nginx")
|
||||
container_id_run = call(f"echo $(docker ps -q -f name=infra_nginx)").out
|
||||
print(call("docker exec {container_id_run} python3 prepare.py && nginx -s reload").out)
|
||||
|
||||
print(result.err, result.out)
|
||||
time.sleep(30)
|
||||
|
Loading…
Reference in New Issue
Block a user