Retry a failed compose-up instead of staying down
Browse files at this commit134740844e514ae38639b754127844773368d9fcParent: e0d5111- fix
- retry a failed compose-up instead of staying down
1 changed file +4 -1
deploy/hezarfen_frontend_compose.servicemodified+4 -1
| @@ -26,7 +26,8 @@ | |||
| 26 | # systemctl --user restart hezarfen_frontend_compose | 26 | # systemctl --user restart hezarfen_frontend_compose |
| 27 | # | 27 | # |
| 28 | # Reboots heal themselves: the user session lingers (`loginctl enable-linger`) | 28 | # Reboots heal themselves: the user session lingers (`loginctl enable-linger`) |
| 29 | -# and this unit runs compose again at boot. | 29 | +# and this unit runs compose again at boot. A failed compose-up is retried |
| 30 | +# (Restart=on-failure, RestartSec=1500s) so it does not wait for a hand restart. | ||
| 30 | 31 | ||
| 31 | [Unit] | 32 | [Unit] |
| 32 | Description=Hezarfen frontend compose stack (Bun static server + /api proxy) | 33 | Description=Hezarfen frontend compose stack (Bun static server + /api proxy) |
| @@ -36,6 +37,8 @@ Wants=network-online.target | |||
| 36 | [Service] | 37 | [Service] |
| 37 | Type=oneshot | 38 | Type=oneshot |
| 38 | RemainAfterExit=yes | 39 | RemainAfterExit=yes |
| 40 | +Restart=on-failure | ||
| 41 | +RestartSec=1500s | ||
| 39 | WorkingDirectory=%h/hezarfen_frontend | 42 | WorkingDirectory=%h/hezarfen_frontend |
| 40 | # Later --env-file wins for duplicate keys: the operator's knobs file first, | 43 | # Later --env-file wins for duplicate keys: the operator's knobs file first, |
| 41 | # the deploy-owned stack.env (HEZARFEN_TAG) second. | 44 | # the deploy-owned stack.env (HEZARFEN_TAG) second. |