fix: add restart: unless-stopped to all services
Ensures all containers come back up automatically after a server reboot. Authored by: Jack Levy
This commit is contained in:
@@ -9,6 +9,7 @@ services:
|
||||
- db_password
|
||||
volumes:
|
||||
- ./postgres/data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-congress} -d ${POSTGRES_DB:-pocketveto}"]
|
||||
interval: 5s
|
||||
@@ -19,6 +20,7 @@ services:
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./redis/data:/data
|
||||
healthcheck:
|
||||
@@ -41,6 +43,7 @@ services:
|
||||
- POSTGRES_HOST=postgres
|
||||
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
restart: unless-stopped
|
||||
secrets:
|
||||
- db_password
|
||||
depends_on:
|
||||
@@ -61,6 +64,7 @@ services:
|
||||
- POSTGRES_HOST=postgres
|
||||
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
restart: unless-stopped
|
||||
secrets:
|
||||
- db_password
|
||||
depends_on:
|
||||
@@ -81,6 +85,7 @@ services:
|
||||
- POSTGRES_HOST=postgres
|
||||
- POSTGRES_PASSWORD_FILE=/run/secrets/db_password
|
||||
- REDIS_URL=redis://redis:6379/0
|
||||
restart: unless-stopped
|
||||
secrets:
|
||||
- db_password
|
||||
depends_on:
|
||||
@@ -93,6 +98,7 @@ services:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user