-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprod.yml
More file actions
48 lines (47 loc) · 986 Bytes
/
prod.yml
File metadata and controls
48 lines (47 loc) · 986 Bytes
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
version: '2'
services:
db:
image: postgres
container_name: ofpl-db
volumes:
- "db-data:/var/lib/postgresql/data"
restart: always
es:
image: elasticsearch
volumes:
- "es-data:/usr/share/elasticsearch/data"
expose:
- "9200"
restart: always
web:
build:
context: ./web
args:
env: prod
command: sh -c "python manage.py collectstatic --noinput; gunicorn config.wsgi:application --name ofpl --bind 0.0.0.0:8000 --workers 3 --reload"
environment:
- DJANGO_SETTINGS_MODULE=config.settings.prod
volumes:
- ./web:/app
- ./static:/static
- ./media:/media
depends_on:
- db
- es
ports:
- "8000:8000"
restart: always
nginx:
image: nginx:latest
ports:
- "8084:8084"
volumes:
- ./nginx:/etc/nginx/conf.d
- ./static:/static
- ./media:/media
depends_on:
- web
restart: always
volumes:
db-data:
es-data: