From ca9a7bd9f052070ce3a0f38976d0e78b178120e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 23 Sep 2026 06:58:50 +0300 Subject: [PATCH] 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. Local-Gate: 0a84e919fa002808d101bedb4a8f7278b9c60b99 (1411 passed, 32s) --- deploy/hezarfen_rag_compose.service | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deploy/hezarfen_rag_compose.service b/deploy/hezarfen_rag_compose.service index 1f8e3d1..7e4f838 100644 --- a/deploy/hezarfen_rag_compose.service +++ b/deploy/hezarfen_rag_compose.service @@ -64,6 +64,13 @@ Wants=network-online.target [Service] Type=oneshot RemainAfterExit=yes +# Başarısız ExecStart (açılışta compose up) 1500s sonra yeniden denenir, biri +# başarılı olana kadar. systemd 259 Type=oneshot için Restart= uygular. Bağlı +# `up` kullanılmaz: podman-compose 1.6 yalnız SIGINT'te down çalıştırır ve +# konteyner başlatma hatasında 0 ile çıkar. 1500s, en uzun deploy sağlık +# kapısından (960s) uzundur; arka plan denemesi geri almayı ezmez. +Restart=on-failure +RestartSec=1500s WorkingDirectory=%h/hezarfen_rag # Operatörün ayar dosyası unit'in ORTAMINA girer (0600). Dosya yoksa unit # BAŞLAMAZ — sessiz bir varsayılana düşmez. Anahtarlar (LLM_API_KEY,