-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
180 lines (168 loc) · 3.38 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
version: '3.9'
services:
authgrpc:
build:
context: .
dockerfile: Dockerfileauthgrpc
restart: always
ports:
- "7072:7072"
depends_on:
- redis
profilegrpc:
build:
context: .
dockerfile: Dockerfileprofilegrpc
restart: always
ports:
- "7074:7074"
depends_on:
- db
- authgrpc
postgrpc:
build:
context: .
dockerfile: Dockerfilepostgrpc
restart: always
ports:
- "7075:7075"
depends_on:
- db
- profilegrpc
community:
build:
context: .
dockerfile: Dockerfilecommunity
restart: always
ports:
- "8086:8086"
- "7076:7076"
depends_on:
- db
- authgrpc
auth:
build:
context: .
dockerfile: Dockerfileauth
restart: always
ports:
- "8082:8082"
depends_on:
- redis
- profilegrpc
- community
file:
build:
context: .
dockerfile: Dockerfilefile
volumes:
- ./image:/image
restart: always
ports:
- "8083:8083"
depends_on:
- authgrpc
- auth
profile:
build:
context: .
dockerfile: Dockerfileprofile
restart: always
ports:
- "8084:8084"
depends_on:
- db
- authgrpc
- postgrpc
- file
post:
build:
context: .
dockerfile: Dockerfilepost
restart: always
ports:
- "8085:8085"
depends_on:
- db
- authgrpc
- profilegrpc
- community
- profile
chat:
build:
context: .
dockerfile: Dockerfilechat
restart: always
ports:
- "8087:8087"
depends_on:
- db
- authgrpc
- post
db:
image: postgres:latest
ports:
- "5432:5432"
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- DATABASE_HOST=${DB_HOST}
volumes:
- postgres_data:/var/lib/postgresql/vk_app_data
expose:
- 5432
healthcheck:
test: "pg_isready --username=postgres && psql --username=postgres --list"
timeout: 10s
retries: 20
redis:
image: redis:latest
ports:
- "6379:6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_USER=${REDIS_USER}
- REDIS_USER_PASSWORD=${REDIS_USER_PASSWORD}
volumes:
- ./redisdata:/data
expose:
- 6379
healthcheck:
test: ["CMD", "redis-cli", "-a", "$REDIS_PASSWORD", "ping"]
interval: 30s
timeout: 10s
retries: 5
restart: always
tty: true
stdin_open: true
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- "./prometheus.yml:/etc/prometheus.yml"
command:
- --config.file=/etc/prometheus.yml
- --web.enable-admin-api
grafana:
image: grafana/grafana
ports:
- "3000:3000"
node_exporter:
depends_on:
- prometheus
image: quay.io/prometheus/node-exporter:latest
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|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)
ports:
- "9100:9100"
volumes:
postgres_data: