fix(devops): add restart policy to backend & frontend containers#2933
Merged
Conversation
The `brn` (backend) and `brn_fe_with_tls` (nginx/TLS) services in the production compose file had no `restart:` policy, so after a VPS reboot or OOM they stayed down while `db_brn` (restart: always) came back. This took https://www.brainup.site/ offline: ports 80/443 returned connection refused because no web container was listening. Add `restart: unless-stopped` to both services so they self-recover on crash/reboot, matching the resilience already configured for the DB. `certbot` is intentionally left without a policy since it is a one-shot job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Frontend test coverage: 72.7% (-0.04% compared to 72.74% on base) |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
https://www.brainup.site/went down: ports 80/443 returned connection refused. Diagnosis showed the VPS itself was healthy (SSH open, the self-hostedselectelActions runner online), but thebrn_fe_with_tls(nginx/TLS) container had stopped and never came back.Root cause: in
docker-compose-run.yml, thebrn(backend) andbrn_fe_with_tls(frontend/nginx) services have norestart:policy, whiledb_brnhasrestart: always. So after a reboot/OOM the database recovers but the web + backend containers stay down.Recovery for the current outage was done by dispatching the Update TLS certificates for selectel workflow (its last step runs
docker compose restart brn_fe_with_tls). This PR prevents recurrence.Change
Add
restart: unless-stoppedtobrnandbrn_fe_with_tlsso they self-recover on crash/reboot, matching the DB's existing resilience.certbotis intentionally left without a policy (one-shot job).unless-stoppedis used rather thanalwaysso a deliberate manualdocker stopis respected across daemon restarts.Notes
docker-compose-run.yml). The change ships automatically on merge tomaster.🤖 Generated with Claude Code