Add restart: unless-stopped to all services
Containers had no restart policy, so they didn't auto-start after a Docker daemon restart or host reboot. unless-stopped restarts on boot and crashes but respects manual stops. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ services:
|
||||
db:
|
||||
image: postgres:17-alpine
|
||||
container_name: purrse-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: purrse
|
||||
POSTGRES_USER: purrse
|
||||
@@ -21,6 +22,7 @@ services:
|
||||
context: .
|
||||
dockerfile: src/Purrse.Api/Dockerfile
|
||||
container_name: purrse-api
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Development}
|
||||
- ConnectionStrings__DefaultConnection=Host=db;Port=5432;Database=purrse;Username=purrse;Password=${DB_PASSWORD:-purrse_dev};Ssl Mode=Prefer;Trust Server Certificate=true
|
||||
@@ -45,6 +47,7 @@ services:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: purrse-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9080:80"
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user