mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-11-02 08:51:09 +00:00
Merge pull request #31 from pezkuwichain/ops/recreate-functions-only
Recreate only the edge runtime on deploy
This commit is contained in:
1 file changed
+6
-1
@@ -89,6 +89,11 @@ def container_running():
|
||||
def restart_runtime():
|
||||
"""Recreate the edge runtime, tolerating a racing restart.
|
||||
|
||||
Only the runtime: --no-deps. Without it compose also starts what functions depends on
|
||||
(kong, and through kong studio); with studio down that failed with "dependency failed
|
||||
to start" after the old runtime had already been removed, which left the new one in
|
||||
Created and every edge function answering 503.
|
||||
|
||||
`docker compose up --force-recreate` fails with "No such container" when
|
||||
something else recreated the container between compose reading state and
|
||||
acting on it — a hand-run restart, or another project's deploy. The deploy
|
||||
@@ -98,7 +103,7 @@ def restart_runtime():
|
||||
"""
|
||||
for attempt in (1, 2, 3):
|
||||
r = subprocess.run(
|
||||
["docker", "compose", "up", "-d", "--force-recreate", "functions"],
|
||||
["docker", "compose", "up", "-d", "--force-recreate", "--no-deps", "functions"],
|
||||
cwd=COMPOSE_DIR, capture_output=True, text=True,
|
||||
)
|
||||
if r.returncode == 0:
|
||||
|
||||
Reference in new issue
Block a user