-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (81 loc) · 1.94 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
version: "3"
services:
db:
image: postgres:alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=db_drone_app
- POSTGRES_USER=db_user
- POSTGRES_PASSWORD=db_password123*
redis:
image: redis:alpine
web:
build: .
command: bash -c "python /code/manage.py migrate --noinput && python /code/manage.py loaddata data.json && python /code/manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code
ports:
- "8000:8000"
environment:
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=db_drone_app
- POSTGRES_USER=db_user
- POSTGRES_PASSWORD=db_password123*
depends_on:
- db
- redis
celery:
build: .
command: celery -A prj_drone_drf worker -l info -f ./logs/drone_celery.log
volumes:
- .:/code
depends_on:
- db
- redis
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
celery-beat:
build: .
command: celery -A prj_drone_drf beat -l info
volumes:
- .:/code
depends_on:
- db
- redis
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
celery-flower:
build: .
ports:
- "5555:5555"
command: celery -A prj_drone_drf flower
volumes:
- .:/code
depends_on:
- db
- redis
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
loki:
image: grafana/loki
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
promtail:
image: grafana/promtail
volumes:
- ./logs:/var/log
command: -config.file=/etc/promtail/config.yml
grafana:
image: grafana/grafana
ports:
- "3000:3000"
volumes:
postgres_data: