-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
109 lines (100 loc) · 2.32 KB
/
docker-compose.yml
File metadata and controls
109 lines (100 loc) · 2.32 KB
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
version: "3.8"
services:
db:
container_name: postgres
image: postgres
command: ["-p", "${POSTGRES_DB_PORT}"]
expose:
- "${POSTGRES_DB_PORT}"
restart: 'always'
environment:
- 'POSTGRES_PASSWORD=${POSTGRES_DB_PASSWORD}'
- 'POSTGRES_DB=${POSTGRES_DB_USER}'
- 'POSTGRES_USER=${POSTGRES_DB_USER}'
# volumes:
# - ./postgres:/var/lib/postgresql/data
redis:
container_name: redis
image: 'redis:latest'
restart: 'always'
environment:
- 'REDIS_HOST=redis'
- 'REDIS_PORT=${PORT_REDIS}'
ports:
- '${PORT_REDIS}:6379'
# volumes:
# - '$PWD/redis.conf:/usr/local/etc/redis/redis.conf'
command:
- 'redis-server'
healthcheck:
test: [ "CMD", "redis-cli","ping" ]
api:
container_name: fast_api
build:
context: .
dockerfile: Dockerfile
restart: 'always'
env_file:
- docker-for.env
environment:
- 'API_REDIS_HOST=redis'
command: ["sh", "/app/bash/app.sh"]
ports:
- '${FAST_API_PORT}:8000'
depends_on:
- db
- redis
celery:
build:
context: .
container_name: celery_app
env_file:
- docker-for.env
command: ["/app/bash/celery.sh", "celery"]
depends_on:
- redis
flower:
build:
context: .
container_name: flower_app
env_file:
- docker-for.env
command: ["/app/bash/celery.sh", "flower"]
depends_on:
- redis
- celery
ports:
- '${FLOWER_PORT}:5555'
prometheus:
image: prom/prometheus
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
grafana:
image: grafana/grafana
container_name: grafana
environment:
- 'GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}'
- 'GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}'
- 'GF_USERS_ALLOW_SIGN_UP=false'
ports:
- "${GRAFANA_PORT}:3000"
# volumes:
# - grafana_data:/var/lib/grafana
# volumes:
# 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