-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
79 lines (70 loc) · 1.68 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
76
77
78
79
# The database container, used to store the Django job results
#
db:
image: postgres:9.3
# message broker, used for passing celery jobs between Django and workers
#
broker:
image: rabbitmq:3.5
# The Celery worker that wil execute the tasks (schedule compute containers)
#
worker:
build: .
command: celery worker -A rodrigues -l INFO
links:
- broker
- db
environment:
- DJANGO_SETTINGS_MODULE=rodrigues.settings.container
- SECRET_KEY="doesn't matter"
- SERVER_NAME
- DEBUG
- SERVER_EMAIL
- EMAIL_PORT
- EMAIL_HOST
- EMAIL_HOST_USER
- EMAIL_HOST_PASSWORD
- STORAGE=${PWD}/storage
volumes:
- /var/run/docker.pid:/var/run/docker.pid
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
- .:/code
- ./storage:/storage
# The actual website
#
django:
build: .
command: uwsgi --socket /socket/rodrigues.sock --module rodrigues.wsgi --chmod-socket=666
#command: gunicorn rodrigues.wsgi:application -w 2 -b :8000 --reload
links:
- db
- broker
environment:
- DJANGO_SETTINGS_MODULE=rodrigues.settings.container
- SECRET_KEY
- SERVER_NAME
- DEBUG
- SERVER_EMAIL
- EMAIL_PORT
- EMAIL_HOST
- EMAIL_HOST_USER
- EMAIL_HOST_PASSWORD
- STORAGE=${PWD}/storage
volumes:
- /var/run/docker.pid:/var/run/docker.pid
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
- .:/code
- /socket
- ./storage:/storage
# A reverse proxy that acts like a frontend to the rest of the application
#
nginx:
image: nginx:1.8
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
volumes_from:
- django
ports:
- 80:80