Skip to content

Commit 0193c79

Browse files
atelalclaude
andcommitted
fix: use restart: always in production docker compose
Follow Docker Compose production best practices by using restart: always instead of restart: unless-stopped for all services. Closes #64 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 45d9e69 commit 0193c79

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docker/docker-compose.production.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ services:
6868
- traefik_logs:/var/log/traefik
6969
networks:
7070
- openspp-prod
71-
restart: unless-stopped
71+
restart: always
7272
# Traefik should start first and stay healthy
7373
healthcheck:
7474
test: ["CMD", "traefik", "healthcheck"]
@@ -98,7 +98,7 @@ services:
9898
# - ./initdb:/docker-entrypoint-initdb.d:ro
9999
networks:
100100
- openspp-prod
101-
restart: unless-stopped
101+
restart: always
102102
healthcheck:
103103
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-odoo} -d ${DB_NAME:-openspp}"]
104104
interval: 10s
@@ -174,7 +174,7 @@ services:
174174
- odoo_addons:/mnt/extra-addons
175175
networks:
176176
- openspp-prod
177-
restart: unless-stopped
177+
restart: always
178178
labels:
179179
# Traefik configuration
180180
- "traefik.enable=true"
@@ -284,7 +284,7 @@ services:
284284
- odoo_addons:/mnt/extra-addons
285285
networks:
286286
- openspp-prod
287-
restart: unless-stopped
287+
restart: always
288288
deploy:
289289
resources:
290290
limits:
@@ -323,7 +323,7 @@ services:
323323
- backup_data:/backups
324324
networks:
325325
- openspp-prod
326-
restart: unless-stopped
326+
restart: always
327327

328328
# ==========================================================================
329329
# ClamAV - Antivirus scanning (optional, enable with --profile clamav)
@@ -346,7 +346,7 @@ services:
346346
- clamav_data:/var/lib/clamav
347347
networks:
348348
- openspp-prod
349-
restart: unless-stopped
349+
restart: always
350350
healthcheck:
351351
test: ["CMD", "/usr/local/bin/clamdcheck.sh"]
352352
interval: 60s

0 commit comments

Comments
 (0)