-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
65 lines (60 loc) · 1.36 KB
/
docker-compose.prod.yml
File metadata and controls
65 lines (60 loc) · 1.36 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
services:
db:
image: postgres:17
container_name: postgres
env_file: .env.local
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "db_prod"]
interval: 15s
timeout: 60s
retries: 5
start_period: 80s
networks:
- app-network
site:
build: .
container_name: site
env_file: .env.local
depends_on:
db:
condition: service_healthy
volumes:
- uploads_volume:/app/uploads
healthcheck:
test: curl --fail -s http://localhost:3000
interval: 10s
timeout: 10s
retries: 5
start_period: 120s
networks:
- app-network
uploads_server:
image: nginx:alpine
container_name: uploads-nginx
volumes:
- uploads_volume:/usr/share/nginx/html/uploads:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./index.html:/usr/share/nginx/html/index.html:ro
- ./404.html:/usr/share/nginx/html/404.html:ro
networks:
- app-network
reverse_proxy:
image: nginx:alpine
container_name: reverse-proxy
ports:
- 3000:80
volumes:
- ./nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- site
- uploads_server
networks:
- app-network
volumes:
db_data:
uploads_volume:
networks:
app-network:
driver: bridge