-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
184 lines (171 loc) · 3.86 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
version: "3"
services:
auth-api-service:
container_name: auth-api-service
privileged: true
restart: unless-stopped
build:
context: ./
dockerfile: Dockerfile.auth
env_file:
- .env
volumes:
- ./keys/:/app/keys:ro
networks:
- social-ai-profile
depends_on:
redis-service:
condition: service_healthy
bot-service:
container_name: bot-service
privileged: true
restart: unless-stopped
build:
context: ./
dockerfile: Dockerfile.bot
env_file:
- .env
volumes:
- ./keys/:/app/keys:ro
networks:
- social-ai-profile
depends_on:
redis-service:
condition: service_healthy
redis-service:
container_name: redis-service
image: redis:latest
restart: always
privileged: true
networks:
- social-ai-profile
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 5s
timeout: 10s
retries: 5
expose:
- "6379"
postgres-service:
container_name: postgres-service
image: postgres:latest
restart: always
privileged: true
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- postgres-db:/data/postgres
networks:
- social-ai-profile
expose:
- "5432"
nginx:
container_name: nginx
image: nginx:latest
restart: always
privileged: true
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d/:/etc/nginx/conf.d/:ro
- ./www/:/var/www/
- ./certbot/conf/:/etc/nginx/ssl/:ro
depends_on:
auth-api-service:
condition: service_started
bot-service:
condition: service_started
redis-service:
condition: service_healthy
ports:
- "80:80"
- "443:443"
networks:
- social-ai-profile
prometheus:
container_name: prometheus
build:
context: ./prometheus
privileged: true
ports:
- "9090:9090"
command:
- --config.file=/etc/prometheus/prometheus.yml
- --web.config.file=/etc/prometheus/web.yml
volumes:
- ./prometheus/:/etc/prometheus/:ro
- prometheus-data:/data
depends_on:
- cadvisor
networks:
- social-ai-profile
cadvisor:
container_name: cadvisor
image: gcr.io/cadvisor/cadvisor:latest
privileged: true
ports:
- "8080:8080"
command:
- --enable_metrics=cpu,memory,network
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
depends_on:
redis-service:
condition: service_healthy
networks:
- social-ai-profile
redis_exporter:
container_name: redis_exporter
image: oliver006/redis_exporter:alpine
privileged: true
restart: unless-stopped
ports:
- "9121:9121"
command:
- --redis.addr=redis://redis:6379
depends_on:
- redis-service
networks:
- social-ai-profile
grafana:
container_name: grafana
build:
context: ./grafana
privileged: true
environment:
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
volumes:
- ./grafana/dashboards:/var/lib/grafana/dashboards
ports:
- "3000:3000"
depends_on:
- prometheus
networks:
- social-ai-profile
alertmanager:
container_name: alertmanager
image: prom/alertmanager:latest
privileged: true
restart: unless-stopped
ports:
- "9093:9093"
volumes:
- ./alertmanager:/config
- alertmanager-data:/data
command:
- --config.file=/config/alertmanager.yml
- --web.config.file=/config/web.yml
depends_on:
- prometheus
networks:
- social-ai-profile
networks:
social-ai-profile:
volumes:
prometheus-data:
alertmanager-data:
postgres-db: