-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
51 lines (46 loc) · 1.32 KB
/
docker-compose.prod.yml
File metadata and controls
51 lines (46 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# =============================================================================
# Docker Compose - PRODUCTION
# =============================================================================
# Usage:
# docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
#
# Ou avec le script:
# ./deploy.sh prod
# =============================================================================
version: '3.8'
services:
app:
image: app:prod
build:
context: .
dockerfile: Dockerfile.prod
environment:
- NODE_ENV=production
- NEXT_CONFIG_FILE=./next.config.prod.js
restart: always
# Pas de volumes en prod (image self-contained)
volumes:
- shared-tmp:/app/tmp
- app_logs:/app/logs
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
worker:
image: worker:prod
build:
context: ./worker
dockerfile: Dockerfile.prod
environment:
- NODE_ENV=production
restart: always
# Pas de volumes source en prodd
volumes:
- shared-tmp:/app/tmp
- app_logs:/app/logs
nginx:
restart: always
# Configuration nginx identique
# Pas besoin de redéfinir networks et volumes (hérités de docker-compose.yml)