forked from elixir-luxembourg/daisy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
93 lines (89 loc) · 2.24 KB
/
docker-compose.yaml
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
90
91
92
93
version: '3'
services:
# web app
web:
build: .
expose:
- '5000'
environment:
- DJANGO_SETTINGS_MODULE=elixir_daisy.settings_compose
volumes:
- statics:/static
- solrdata:/solr
- .:/code
depends_on:
- db
- solr
- mq
command: gunicorn --reload -w 2 -b :5000 --pid /run/gunicorn.pid elixir_daisy.wsgi
# database
db:
image: postgres:10.1
restart: on-failure
environment:
POSTGRES_PASSWORD: daisy
POSTGRES_USER: daisy
POSTGRES_DB: daisy
ports:
- "5433:5432"
volumes:
- pgdata:/var/lib/postgresql/data
# web werver frontend
nginx:
build: ./docker/nginx
restart: on-failure
volumes:
- statics:/public/static:ro
ports:
- '80:80'
- '443:443'
depends_on:
- web
# FTS db
solr:
build: ./docker/solr
ports:
- "8983:8983"
volumes:
- solrdata:/opt/solr/server/solr
# rabbit mq
mq:
image: rabbitmq:3.9-management-alpine
restart: on-failure
ports:
- "15672:15672"
- "5672:5672"
# task monitoring
flower:
image: mher/flower:0.9.7
command: --broker=amqp://guest:guest@mq:5672// --broker_api=http://guest:guest@mq:15672/api/
ports:
- "5555:5555"
depends_on:
- mq
# task runner
worker:
build: .
environment:
- DJANGO_SETTINGS_MODULE=elixir_daisy.settings_compose
volumes:
- .:/code
depends_on:
- db
- mq
command: "celery -A elixir_daisy.celery_app worker --loglevel=DEBUG"
# celery beat
beat:
build: .
environment:
- DJANGO_SETTINGS_MODULE=elixir_daisy.settings_compose
volumes:
- .:/code
depends_on:
- db
- mq
command: "celery -A elixir_daisy beat --loglevel=DEBUG --pidfile= --scheduler django_celery_beat.schedulers:DatabaseScheduler"
volumes:
pgdata:
statics:
solrdata: