-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose-prod.yml
79 lines (73 loc) · 2 KB
/
docker-compose-prod.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
#####################################################
# Used for Production
#####################################################
version: "3.3"
services:
db:
container_name: indeaa_postgres
image: postgres:13.5-alpine
restart: unless-stopped
env_file: .env
environment:
TZ: Australia/Perth
volumes:
- ./data/docker/indeaa/postgres:/var/lib/postgresql/data
stdin_open: false # docker run -i
tty: false # docker run -t
frontend:
build:
context: .
dockerfile: docker/frontend/Dockerfile
args:
- NODE_ENV=production
- SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
container_name: indeaa_react
restart: unless-stopped
env_file: .env
ports:
- 10024:3000
stdin_open: false # docker run -i
tty: false # docker run -t
# The backend that performs as the actual API
backend:
build:
context: .
dockerfile: docker/backend/Dockerfile
container_name: indeaa_django
restart: unless-stopped
env_file: .env
environment:
- APP_DEPLOY_TYPE=WEBWORKER
depends_on:
- db
volumes:
- ./opt/accesslogs/:/var/log/accesslogs/
- ./opt/static_files/:/app_code/static_files
stdin_open: false # docker run -i
tty: false # docker run -t
# Container that runs and performs the migration
migrate:
build:
context: .
dockerfile: docker/backend/Dockerfile
container_name: indeaa_django_migrate
restart: on-failure
env_file: .env
environment:
- APP_DEPLOY_TYPE=MIGRATE_AND_SETUP
depends_on:
- db
stdin_open: false # docker run -i
tty: false # docker run -t
# Nginx Container that serves up the static content of Django
nginx: # nginx to serve static files
image: nginx:1.15-alpine
container_name: nginx
restart: always
ports:
- "10025:8000"
volumes:
- ./docker/backend/nginx/custom.conf:/etc/nginx/conf.d/default.conf
- ./opt/static_files:/opt/static_files
depends_on:
- backend