forked from unicef/invent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (69 loc) · 1.66 KB
/
docker-compose.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
version: "3"
services:
django:
restart: always
build: ./django
env_file:
- ./django/.env
expose:
- "8000"
links:
- postgres
- celery
- redis
volumes:
- ./django:/src
- ./nginx/site/static:/usr/share/django/static:rw
- ./django/media:/usr/share/django/media:rw
- log_data:/var/log/django
- media_data:/src/media
command: /usr/local/bin/gunicorn tiip.wsgi:application -w 2 -b :8000 --reload --timeout 120
# command: python manage.py runserver 0.0.0.0:8000 # FOR DEBUG
celery:
restart: always
build: ./django
environment:
- C_FORCE_ROOT=true
links:
- postgres
- redis
volumes:
- ./django:/src
- log_data:/var/log/django
command: /usr/local/bin/celery -A scheduler worker -B -l info
nginx:
restart: always
image: nginx:1.15.6
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/site:/usr/share/nginx/html:rw
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
- ./nginx/config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./django/media:/usr/share/nginx/html/media:rw
- ./nginx/certs:/etc/letsencrypt:rw
- ./nginx/certs-data:/data/letsencrypt:rw
links:
- django
postgres:
restart: always
image: postgres:10.4
environment:
- POSTGRESQL_DB=postgres
- POSTGRESQL_USER=postgres
- POSTGRESQL_PASSWORD=postgres
volumes:
- postgres_data:/var/lib/postgresql/data
expose:
- "5432"
redis:
restart: always
image: redis:4.0.10
expose:
- "6379"
volumes:
postgres_data:
log_data:
media_data: