-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
112 lines (103 loc) · 1.96 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
102
103
104
105
106
107
108
109
110
111
112
version: "3.7"
services:
db:
image: postgres:15
container_name: db_app
volumes:
- db-data:/var/lib/postgresql/data
command: -p 5432
expose:
- 5432
env_file:
- .env-prod
redis:
image: redis:7
container_name: redis_app
command: --port 6379
expose:
- 6379
api_app:
build:
context: .
env_file:
- .env-prod
container_name: fastapi_api_app
command: ["/fastapi_app/docker/api_app.sh"]
ports:
- 9999:8000
expose:
- 8000
depends_on:
- db
- redis
web_app:
build:
context: .
env_file:
- .env-prod
container_name: fastapi_web_app
command: ["/fastapi_app/docker/web_app.sh"]
ports:
- 9998:8000
expose:
- 8000
depends_on:
- api_app
celery:
build:
context: .
env_file:
- .env-prod
container_name: celery_app
command: ["/fastapi_app/docker/celery.sh", "celery"]
depends_on:
- redis
flower:
build:
context: .
env_file:
- .env-prod
container_name: flower_app
command: ["/fastapi_app/docker/celery.sh", "flower"]
depends_on:
- redis
- celery
ports:
- 8888:5555
prometheus:
image: prom/prometheus
container_name: prometheus
ports:
- 9090:9090
expose:
- 9090
volumes:
- ./prometheus_data/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
depends_on:
- web_app
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
depends_on:
- web_app
volumes:
db-data:
name: ${DATABASE_VOLUME}
prometheus_data:
driver: local
driver_opts:
o: bind
type: none
device: ./prometheus_data
grafana_data:
driver: local
driver_opts:
o: bind
type: none
device: ./grafana_data