Add restart: unless-stopped to db and app services

Automatically restarts both containers on crash or server reboot,
unless manually stopped with docker compose down.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 20:56:33 -04:00
parent 3c13ae3597
commit decfb19ec6

View File

@@ -1,6 +1,7 @@
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
@@ -17,6 +18,7 @@ services:
app:
build: .
restart: unless-stopped
ports:
- "0.0.0.0:3000:3000"
environment: