forked from CEOS-Developers/django-vote-14th
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
58 lines (55 loc) · 1.12 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
version: "3.8"
services:
db:
container_name: db
image: mariadb:latest
restart: always
environment:
MYSQL_ROOT_HOST: '%'
expose:
- 3306
ports:
- "3307:3306"
env_file:
- .env
volumes:
- dbdata:/var/lib/mysql
web:
container_name: web
build:
context: ./
dockerfile: Dockerfile.prod
command: gunicorn vote_mailedit.wsgi:application --bind 0.0.0.0:8000
environment:
DJANGO_SETTINGS_MODULE: vote_mailedit.settings.prod
env_file:
- .env
volumes:
- static:/home/app/web/static
- media:/home/app/web/media
depends_on:
- db
expose:
- 8000
entrypoint:
- sh
- config/docker/entrypoint.prod.sh
nginx:
container_name: nginx
build: ./config/nginx
volumes:
- type: bind
source: /home/app/certbot/conf/archive
target: /etc/nginx/ssl
- /home/app/certbot/data:/var/www/certbot
- static:/home/app/web/static
- media:/home/app/web/media
ports:
- "80:80"
- "443:443"
depends_on:
- web
volumes:
static:
media:
dbdata: