Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (82 loc) · 2.06 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (82 loc) · 2.06 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3'
services:
db:
image: postgres:9.6
container_name: dddemo-postgres
expose:
- "5432"
networks:
- jaz
rabbitmq:
image: rabbitmq:3
container_name: dddemo-rabbitmq
expose:
- "5672"
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
networks:
- jaz
app:
build:
context: .
dockerfile: Dockerfile
container_name: dddemo-app
command: /site/docker-utils/app-start.sh
volumes:
- .:/site/proj/
- static-volume:/site/htdocs/static/
expose:
- "8000"
environment:
- DATABASE_URL=postgres://postgres@db/postgres
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- SITE_DIR=/site/
- PROJECT_NAME=dddemo
- DJANGO_DEBUG=True
depends_on:
- rabbitmq
networks:
- jaz
worker:
build:
context: .
dockerfile: Dockerfile
container_name: dddemo-worker
command: /site/env/bin/celery worker -A dddemo --workdir /site/proj/ -l info
volumes:
- .:/site/proj/
- static-volume:/site/htdocs/static/
environment:
- DATABASE_URL=postgres://postgres@db/postgres
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- SITE_DIR=/site/
- PROJECT_NAME=dddemo
- DJANGO_DEBUG=False
depends_on:
- rabbitmq
networks:
- jaz
web:
image: nginx:1.11
container_name: dddemo-web
ports:
- "80:80"
- "443:443"
depends_on:
- app
volumes:
- ./docker-utils/nginx/default.template.conf:/root/default.template.conf
- ./docker-utils/ssl/:/site/ssl/
- static-volume:/static
command: /bin/bash -c "envsubst '$$NGINX_HTTP_PORT $$NGINX_HTTPS_PORT' < /root/default.template.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
environment:
- NGINX_HOST=foobar.com
- NGINX_HTTP_PORT=80
- NGINX_HTTPS_PORT=443
networks:
- jaz
networks:
jaz:
volumes:
static-volume: