-
Notifications
You must be signed in to change notification settings - Fork 1
/
production.yml
64 lines (58 loc) · 1.7 KB
/
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
version: '3.7'
volumes:
production_traefik: {}
services:
django:
build:
context: .
dockerfile: compose/production/django/Dockerfile
image: 282428440465.dkr.ecr.us-east-1.amazonaws.com/overflowedminds_production_django
restart: on-failure
depends_on:
- redis
- frontend
env_file:
- backend/.envs/.production/.django
- backend/.envs/.production/.postgres
command: /start
frontend:
build:
context: .
dockerfile: compose/production/frontend/Dockerfile
image: 282428440465.dkr.ecr.us-east-1.amazonaws.com/overflowedminds_production_frontend
restart: on-failure
env_file:
- frontend/.envs/.production/.react
traefik:
build:
context: .
dockerfile: compose/production/traefik/Dockerfile
image: 282428440465.dkr.ecr.us-east-1.amazonaws.com/overflowedminds_production_traefik
restart: on-failure
depends_on:
- django
volumes:
# this is necessary so the certificate generated in the container persists on container restarts
# and traefik does not request new certificates for every restart (as long as the volume exists)
- production_traefik:/etc/traefik/acme:z
# Required for Traefik to listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
env_file:
- backend/.envs/.production/.traefik
command: /start
redis:
image: redis:5.0
restart: on-failure
awscli:
build:
context: .
dockerfile: compose/production/aws/Dockerfile
env_file:
- backend/.envs/.production/.django