-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
101 lines (93 loc) · 2.6 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
services:
debug:
image: python
web:
build: .
volumes:
- .:/app
- web-attachments:/app/attachments
- web-coverage:/var/coverage
ports:
- "8000:8000"
command: bin/wait-for-deps.sh ./manage.py runserver 0.0.0.0:8000
depends_on:
- db
- elasticsearch
- rabbitmq
environment:
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq//
- DATABASE_URL=postgresql://writeinpublic:devpassword@db/writeinpublic
- DJANGO_DEBUG=True
- DJANGO_DEBUG_TOOLBAR
- DJANGO_SECRET_KEY=not-secret-in-dev
- DJANGO_TESTING
- ELASTICSEARCH_INDEX=writeinpublic
- ELASTICSEARCH_URL=http://elasticsearch:9200/
- EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
- SESSION_COOKIE_DOMAIN=127.0.0.1.nip.io
worker:
build: .
volumes:
- .:/app
- web-attachments:/app/attachments
command: bin/wait-for-deps.sh celery -A writeit worker
depends_on:
- db
- elasticsearch
- rabbitmq
environment:
- DATABASE_URL=postgresql://writeinpublic:devpassword@db/writeinpublic
- DJANGO_DEBUG=True
- DJANGO_SECRET_KEY=not-secret-in-dev
- ELASTICSEARCH_INDEX=writeinpublic
- ELASTICSEARCH_URL=http://elasticsearch:9200/
- EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
beat:
build: .
volumes:
- .:/app
- beat-data:/var/celerybeat
command: bin/wait-for-deps.sh celery -A writeit beat --pidfile= -s /var/celerybeat/celerybeat-schedule
depends_on:
- db
- elasticsearch
- rabbitmq
environment:
- DATABASE_URL=postgresql://writeinpublic:devpassword@db/writeinpublic
- DJANGO_DEBUG=True
- DJANGO_SECRET_KEY=not-secret-in-dev
- ELASTICSEARCH_INDEX=writeinpublic
- ELASTICSEARCH_URL=http://elasticsearch:9200/
- EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
db:
image: postgres:12.19
environment:
- POSTGRES_USER=writeinpublic
- POSTGRES_PASSWORD=devpassword
- POSTGRES_DB=writeinpublic
volumes:
- db-data:/var/lib/postgresql/data
elasticsearch:
image: elasticsearch:1
volumes:
- elasticsearch-data:/usr/share/elasticsearch/data
environment:
- ES_MAX_MEM=1g
ports:
- 9200
rabbitmq:
image: rabbitmq:3.7.28-management
volumes:
- rabbitmq-data:/var/lib/rabbitmq/
environment:
- RABBITMQ_VM_MEMORY_HIGH_WATERMARK=1000MiB
ports:
- 5672:5672
- 15672:15672
volumes:
web-attachments:
web-coverage:
db-data:
elasticsearch-data:
rabbitmq-data:
beat-data: