-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
176 lines (175 loc) · 4.7 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
version: '3'
services:
api-db:
image: duckluckmarket/api-db:${API_DB_TAG}
restart: unless-stopped
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./scripts/postgresql/init_api_db.sql:/docker-entrypoint-initdb.d/init_api_db.sql
- ./scripts/postgresql/categories.csv:/categories.csv
- ./scripts/postgresql/products.csv:/products.csv
networks:
- api-network
api-server-push-db:
image: redis
restart: unless-stopped
networks:
- api-network
auth-db:
image: postgres
restart: unless-stopped
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./scripts/postgresql/init_auth_db.sql:/docker-entrypoint-initdb.d/init_auth_db.sql
networks:
- auth-network
session-db:
image: redis
restart: unless-stopped
networks:
- session-network
cart-db:
image: redis
restart: unless-stopped
networks:
- cart-network
api-server:
depends_on:
- api-db
image: duckluckmarket/api-server:${API_SERVER_TAG}
container_name: api_server
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./log:/log
- ./configs/envs/api_server:/configs/envs/api_server
- ./configs/envs/network.env:/configs/envs/network.env
networks:
- api-network
- app-network
session-service:
depends_on:
- session-db
image: duckluckmarket/session-service:${SESSION_SERVICE_TAG}
container_name: session_service
restart: unless-stopped
volumes:
- ./log:/log
- ./configs/envs/session_service:/configs/envs/session_service
- ./configs/envs/network.env:/configs/envs/network.env
networks:
- session-network
- app-network
auth-service:
depends_on:
- auth-db
image: duckluckmarket/auth-service:${AUTH_SERVICE_TAG}
container_name: auth_service
restart: unless-stopped
volumes:
- ./log:/log
- ./configs/envs/auth_service:/configs/envs/auth_service
- ./configs/envs/network.env:/configs/envs/network.env
networks:
- auth-network
- app-network
cart-service:
depends_on:
- cart-db
image: duckluckmarket/cart-service:${CART_SERVICE_TAG}
container_name: cart_service
restart: unless-stopped
volumes:
- ./log:/log
- ./configs/envs/cart_service:/configs/envs/cart_service
- ./configs/envs/network.env:/configs/envs/network.env
networks:
- cart-network
- app-network
node-exporter:
image: prom/node-exporter
restart: always
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
networks:
- app-network
prometheus:
depends_on:
- api-server
- node-exporter
image: prom/prometheus
privileged: true
restart: always
volumes:
- ./configs/prometheus/prometheus.yml:/configs/prometheus/prometheus.yml
- ./configs/prometheus/alerts.yml:/configs/prometheus/alerts.yml
command:
- '--config.file=/configs/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention=20d'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
networks:
- api-network
- app-network
grafana:
image: grafana/grafana:latest
depends_on:
- prometheus
- node-exporter
env_file:
- configs/envs/grafana/main.env
volumes:
- ./services_data/grafana/data:/var/lib/grafana
- ./services_data/grafana/datasources:/etc/grafana/datasources
- ./services_data/grafana/dashboards:/etc/grafana/dashboards
ports:
- "3030:3000"
networks:
- app-network
alertmanager:
image: prom/alertmanager
volumes:
- ./configs/alertmanager:/configs/alertmanager
command:
- '--config.file=/configs/alertmanager/alertmanager.yml'
- '--storage.path=/configs/alertmanager'
restart: always
networks:
- app-network
alertmanager-bot:
image: metalmatze/alertmanager-bot
depends_on:
- alertmanager
command:
- "--listen.addr=0.0.0.0:8080"
env_file:
- configs/envs/alertmanager_bot/main.env
volumes:
- ./configs/alertbot/default.tmpl:/configs/alertbot/default.tmpl
restart: always
networks:
- app-network
networks:
api-network:
driver: bridge
auth-network:
driver: bridge
cart-network:
driver: bridge
session-network:
driver: bridge
app-network:
driver: bridge
volumes:
grafana-storage:
external: true