forge
Explore
Log in

Don't you dare go Hollow

Retry a failed compose-up instead of staying down

Browse files at this commit

a039b605eb75fb249c46e4c1d126a32a0984a1a8Ahmet Kaan GümüşParent: 372f8f3
  • fix
    • retry a failed compose-up instead of staying down
Show full message
fix: retry a failed compose-up instead of staying down

Keep Type=oneshot and `up -d`. systemd 259 honors Restart=on-failure
for oneshot (measured: the restart counter advanced). Attached
`podman compose up` does not: podman-compose 1.6 only runs down on
SIGINT, and a container start failure exits 0, so Type=simple
Restart= would never see the failure. RestartSec=1500s is past the
longest deploy health gate (rag, 960s), so a background retry cannot
undo a rollback.
deploy/hezarfen_rule_based_chatbot_compose.servicemodified+7 -0
@@ -28,6 +28,13 @@ Wants=network-online.target
28 [Service]28 [Service]
29 Type=oneshot29 Type=oneshot
30 RemainAfterExit=yes30 RemainAfterExit=yes
31+# Başarısız ExecStart (açılışta compose up) 1500s sonra yeniden denenir, biri
32+# başarılı olana kadar. systemd 259 Type=oneshot için Restart= uygular. Bağlı
33+# `up` kullanılmaz: podman-compose 1.6 yalnız SIGINT'te down çalıştırır ve
34+# konteyner başlatma hatasında 0 ile çıkar. 1500s, en uzun deploy sağlık
35+# kapısından (960s) uzundur; arka plan denemesi geri almayı ezmez.
36+Restart=on-failure
37+RestartSec=1500s
31 WorkingDirectory=%h/hezarfen_rule_based_chatbot38 WorkingDirectory=%h/hezarfen_rule_based_chatbot
32 # İKİ `--env-file` YASAK. podman-compose 1.6.0 `--env-file`ı TEK DEĞER sayar39 # İKİ `--env-file` YASAK. podman-compose 1.6.0 `--env-file`ı TEK DEĞER sayar
33 # (podman_compose.py:2941-2946) ve verildiğinde YALNIZCA SONUNCUSUNU okur: iki40 # (podman_compose.py:2941-2946) ve verildiğinde YALNIZCA SONUNCUSUNU okur: iki