-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.production.yml
89 lines (80 loc) · 1.71 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
84
85
86
87
88
89
version: "3.4"
x-defaults: &defaults
restart: always
services:
app:
<<: *defaults
build:
context: .
dockerfile: ./docker/production/app/Dockerfile
image: candis-app:production
container_name: production_candis_app
networks:
- db
- cache
- proxy
depends_on:
- db
- cache
env_file:
- ./.envs/.production/.app
volumes:
- production_candis_resources:/app/CRES
- production_candis_data:/app/candisDATA
ports:
- "80"
environment:
- VIRTUAL_HOST=${VIRTUAL_HOST}
db:
<<: *defaults
build:
context: .
dockerfile: ./docker/base/db/Dockerfile
image: candis-db
container_name: production_candis_db
networks:
- db
volumes:
- production_db_data:/var/lib/postgresql/data
- production_db_backups:/backups
env_file:
- ./.envs/.production/.db
cache:
<<: *defaults
build:
context: .
dockerfile: ./docker/base/cache/Dockerfile
image: candis-cache
container_name: production_candis_cache
networks:
- cache
proxy:
<<: *defaults
build:
context: .
dockerfile: ./docker/production/proxy/Dockerfile
image: candis-proxy
container_name: production_candis_proxy
networks:
- proxy
env_file:
- ./.envs/.production/.proxy
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- app
ports:
- "80:80"
- "443:443"
volumes:
production_db_data: { }
production_db_backups: { }
production_candis_resources: { }
production_candis_data: { }
networks:
db:
driver: bridge
cache:
driver: bridge
proxy:
driver: bridge