fix deploy: only restart app services, never infra (postgres, rustfs)
Infrastructure services store state on disk. Restarting them via docker compose causes unclean shutdowns that corrupt RustFS IAM. Only restart the 5 application images that the pipeline builds: notebooks, zotero, docs, api, mc. Gitea, woodpecker, and other services pick up new .env values on their next natural restart or can be restarted manually if needed.
This commit is contained in:
@@ -202,21 +202,15 @@ def deploy(
|
|||||||
# Set COMMIT_SHA for compose image tags
|
# Set COMMIT_SHA for compose image tags
|
||||||
_set_env_var(env_path, "COMMIT_SHA", f"sha-{commit_sha[:8]}")
|
_set_env_var(env_path, "COMMIT_SHA", f"sha-{commit_sha[:8]}")
|
||||||
|
|
||||||
# Restart only services whose images or env changed.
|
# Restart only application services whose images changed.
|
||||||
# Avoid --remove-orphans which recreates containers and breaks
|
# NEVER restart infrastructure (postgres, rustfs) — they store
|
||||||
# network attachments on rootless Docker.
|
# state on disk and unclean restarts corrupt IAM/data.
|
||||||
restart_services = [
|
restart_services = [
|
||||||
"notebooks",
|
"notebooks",
|
||||||
"zotero",
|
"zotero",
|
||||||
"docs",
|
"docs",
|
||||||
"api",
|
"api",
|
||||||
"mc",
|
"mc",
|
||||||
"gitea",
|
|
||||||
"woodpecker-server",
|
|
||||||
"woodpecker-agent",
|
|
||||||
"nessie",
|
|
||||||
"polaris",
|
|
||||||
"grafana",
|
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
|
|||||||
Reference in New Issue
Block a user