-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
53 lines (47 loc) · 909 Bytes
/
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
services:
db:
restart: on-failure
image: postgres
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis
restart: on-failure
ports:
- "6379:6379"
celery:
build: .
restart: on-failure
env_file:
- .env
command: celery -A config worker -l info
depends_on:
- redis
- app
celery-beat:
build: .
restart: on-failure
command: celery -A config beat -l info
depends_on:
- celery
- db
app:
build: .
restart: on-failure
env_file:
- .env
command: >
sh -c "python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
depends_on:
- db
volumes:
pgdata: