-
Notifications
You must be signed in to change notification settings - Fork 475
Expand file tree
/
Copy pathproduction.yml
More file actions
57 lines (52 loc) · 1.25 KB
/
production.yml
File metadata and controls
57 lines (52 loc) · 1.25 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
version: '3'
services:
web:
restart: always
build: ./web
ports:
- "8000"
entrypoint: ["./wait-for-it.sh", "${DB_HOST}:${DB_PORT}", "--strict", "--timeout=300", "--"]
volumes:
- web-static:/usr/src/app/static
env_file: .env
environment:
DB_TYPE: ${DB_TYPE}
command: bash -c "python manage.py makemigrations && python manage.py migrate && gunicorn docker_django.wsgi:application -w 2 -b :8000"
nginx:
restart: always
build: ./nginx
ports:
- "${HOST_NGINX_PORT}:80"
volumes:
- web-static:/www/static
links:
- web:web
redis:
restart: always
image: redis:latest
ports:
- "6379"
volumes:
- redisdata:/data
database:
build: ./${DB_TYPE}
image: ${DB_TYPE}_db
environment:
# POSTGRES SPECIFIC
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
# MYSQL SPECIFIC
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASS}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
ports:
- "${HOST_DATABASE_PORT}:${DB_PORT}"
volumes:
- mysql-vol:/var/lib/mysql
- pgdata:/var/lib/postgresql/data/
volumes:
mysql-vol:
redisdata:
web-static: