-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
47 lines (40 loc) · 1.12 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
x-service: &service
image: thenewboston-backend:current
restart: unless-stopped
depends_on:
redis:
# TODO(dmu) LOW: Add redis health check and change to `condition: service_healthy`
condition: service_started
env_file:
- path: '/etc/thenewboston/.env'
required: false
environment:
THENEWBOSTON_SETTING_CHANNEL_LAYERS: '{"default":{"CONFIG":{"hosts":[["redis", 6379]]}}}'
THENEWBOSTON_SETTING_CELERY_RESULT_BACKEND: redis://redis:6379/0
THENEWBOSTON_SETTING_CELERY_BROKER_URL: redis://redis:6379/0
services:
redis:
image: redis:6.2.6-alpine
restart: unless-stopped
ports:
# TODO(dmu) LOW: Do we need to expose to expose Redis to localhost in production?
- 127.0.0.1:6379:6379
volumes:
- redis-data:/var/lib/redis
app:
<<: *service
command: ./run-django.sh
ports:
- 127.0.0.1:8000:8000
discord-bot:
<<: *service
command: ./run-discord-bot.sh
celery:
<<: *service
command: ./run-celery.sh
celery-beat:
<<: *service
command: ./run-celery-beat.sh
volumes:
redis-data:
driver: local