From d24b2c220ea79a0388f83faa18b36ead179977c8 Mon Sep 17 00:00:00 2001 From: Alex Kanunnikov Date: Mon, 13 Jul 2026 12:00:33 +0000 Subject: [PATCH] fix(devops): add restart policy to brn and frontend containers 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) --- docker-compose-run.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose-run.yml b/docker-compose-run.yml index 0b2261b42..84c51cf86 100644 --- a/docker-compose-run.yml +++ b/docker-compose-run.yml @@ -14,6 +14,7 @@ services: brn: container_name: brn image: brainup/brn-backend + restart: unless-stopped command: > java -Xms128m -Xmx256m -XX:MaxMetaspaceSize=192m -XX:+UseSerialGC -XX:MaxRAM=400m @@ -50,6 +51,7 @@ services: brn_fe_with_tls: image: brainup/brn-frontend-with-tls:latest container_name: brn_fe_with_tls + restart: unless-stopped ports: - 80:80 - 443:443