fix deploy: only restart app services, never infra (postgres, rustfs)
Some checks are pending
ci/woodpecker/push/deploy Pipeline is running
ci/woodpecker/push/infra-ci Pipeline was successful
coverage 99% coverage
ci/woodpecker/push/ci Pipeline was successful

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:
kert
2026-03-23 12:55:47 -04:00
parent a4a2dcb077
commit 1727e1d59b

View File

@@ -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(