-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.production.yml
83 lines (74 loc) · 1.55 KB
/
docker-compose.production.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
73
74
75
76
77
78
79
80
81
82
83
version: "3.4"
x-defaults: &defaults
restart: always
services:
db:
<<: *defaults
build:
context: .
dockerfile: ./docker/base/db/Dockerfile
networks:
- db
volumes:
- production_db_data:/var/lib/postgresql/data
- production_db_backups:/backups
env_file:
- ./.envs/.production/.db
web:
<<: *defaults
build:
context: .
dockerfile: ./docker/base/web/Dockerfile
depends_on:
- db
networks:
- db
- web
volumes:
- ./app/server:/app:rw,cached
- production_web_node_modules:/app/node_modules
- production_web_uploads:/app/uploads
ports:
- "5000:5000"
env_file:
- ./.envs/.production/.web
command: /start
app:
<<: *defaults
build:
context: .
dockerfile: ./docker/development/app/Dockerfile
depends_on:
- web
volumes:
- ./app/client:/app:rw,cached
- production_app_node_modules:/app/node_modules
networks:
- web
ports:
- "3000:3000"
env_file:
- ./.envs/.production/.app
command: /start
proxy:
<<: *defaults
build:
context: .
dockerfile: ./docker/production/proxy/Dockerfile
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- web
env_file:
- ./.envs/.production/.proxy
networks:
db:
driver: bridge
web:
driver: bridge
volumes:
production_db_data: { }
production_db_backups: { }
production_web_node_modules: { }
production_app_node_modules: { }
production_web_uploads: { }