-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
56 lines (52 loc) · 1.09 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
version: '3'
services:
web:
build: .
command: >
sh -c "python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
volumes:
- ./KryptoAPI/:/code
env_file:
- ./KryptoAPI/.docker.env
depends_on:
- db
db:
image: postgres:14rc1-alpine3.14
env_file:
- ./KryptoAPI/.docker.env
volumes:
- pgdata:/var/lib/postgresql/data/
rabbitmq:
image: "rabbitmq:3-management-alpine"
env_file:
- ./KryptoAPI/.docker.env
ports:
- 5672:5672
- 15672:15672
restart: on-failure
celery-worker:
build: .
command: sh -c 'sleep 8; celery -A KryptoAPI worker -l INFO'
env_file:
- ./KryptoAPI/.docker.env
volumes:
- ./KryptoAPI/:/code
depends_on:
- db
- rabbitmq
celery-beat:
build: .
command: sh -c 'sleep 10; celery -A KryptoAPI beat -l debug'
env_file:
- ./KryptoAPI/.docker.env
volumes:
- ./KryptoAPI/:/code
depends_on:
- db
- rabbitmq
- celery-worker
volumes:
pgdata: {}