-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.staging.yml
72 lines (72 loc) · 1.63 KB
/
docker-compose.staging.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
services:
backend:
image: snowwild/backend-sw
command: sh -c "npm run build && npm run startjs"
ports:
- 4000:4000
healthcheck:
test:
[
"CMD-SHELL",
"curl -f http://backend:4000/graphql?query=%7B__typename%7D -H 'Apollo-Require-Preflight: true' || exit 1",
]
interval: 10s
timeout: 30s
retries: 5
environment:
- WDS_SOCKET_HOST=127.0.0.1
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
depends_on:
db:
condition: service_healthy
frontend:
image: snowwild/frontend-sw
command: sh -c "npm run build && npm run start"
ports:
- 3000:3000
environment:
- WDS_SOCKET_HOST=127.0.0.1
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
env_file:
- ./.env
db:
image: postgres:15
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -d snowwild -U postgres"]
interval: 5s
timeout: 40s
retries: 15
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: snowwild
ports:
- 5432:5432
volumes:
- snowwild-data-staging:/var/lib/postgresql/data
adminer:
image: adminer
depends_on:
- db
restart: always
ports:
- 8080:8080
nginx:
image: nginx:1.21.3
depends_on:
- backend
- frontend
- db
- adminer
restart: always
ports:
- ${GATEWAY_PORT:-8002}:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./logs:/var/log/nginx
# On aura un serveur front et non un dossier à partager
volumes:
snowwild-data-staging: