-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
216 lines (215 loc) · 5.57 KB
/
docker-compose.yaml
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
name: 'ducks-tinder'
services:
chat-service:
container_name: chat-service
restart: always
build:
context: .
dockerfile: chat-service/Dockerfile
depends_on:
- rabbitmq
- postgres
- user-service
environment:
NODE_ENV: dev-docker
ports:
- '${CHAT_SERVICE_PORT}:${CHAT_SERVICE_PORT}'
user-service:
container_name: user-service
restart: always
build:
context: .
dockerfile: user-service/Dockerfile
environment:
NODE_ENV: dev-docker
ports:
- '${USER_SERVICE_PORT}:${USER_SERVICE_PORT}'
depends_on:
- rabbitmq
- postgres
- file-service
- map-service
map-service:
container_name: map-service
restart: always
build:
context: map-service
dockerfile: Dockerfile
environment:
SPRING_PROFILES_ACTIVE: dev-docker
depends_on:
- postgres
ports:
- '${MAP_SERVICE_PORT}:${MAP_SERVICE_PORT}'
- '${MAP_SERVICE_GRPC_PORT}:${MAP_SERVICE_GRPC_PORT}'
auth-service:
container_name: auth-service
restart: always
build:
context: auth-service
dockerfile: Dockerfile
environment:
MODE: dev-docker
ports:
- '${AUTH_SERVICE_PORT}:${AUTH_SERVICE_PORT}'
deploy:
restart_policy:
condition: on-failure
command: ['/usr/src/app/app']
depends_on:
- rabbitmq
- postgres
billing-service:
container_name: billing-service
restart: always
build:
context: billing-service
dockerfile: Dockerfile
environment:
MODE: dev-docker
ports:
- '${BILLING_SERVICE_PORT}:${BILLING_SERVICE_PORT}'
- '${BILLING_SERVICE_GRPC_PORT}:${BILLING_SERVICE_GRPC_PORT}'
deploy:
restart_policy:
condition: on-failure
command: ['/usr/src/app/app']
depends_on:
- postgres
subscription-service:
container_name: subscription-service
restart: always
build:
context: subscription-service
dockerfile: Dockerfile
environment:
MODE: dev-docker
ports:
- '${SUBSCRIPTION_SERVICE_PORT}:${SUBSCRIPTION_SERVICE_PORT}'
- '${SUBSCRIPTION_SERVICE_GRPC_PORT}:${SUBSCRIPTION_SERVICE_GRPC_PORT}'
deploy:
restart_policy:
condition: on-failure
command: ['/usr/src/app/app']
depends_on:
- billing-service
- postgres
file-service:
container_name: file-service
restart: always
build:
context: .
dockerfile: file-service/Dockerfile
volumes:
- file_service_static_data:/usr/src/static
environment:
MODE: dev-docker
ports:
- '${FILE_SERVICE_PORT}:${FILE_SERVICE_PORT}'
- '${FILE_SERVICE_GRPC_PORT}:${FILE_SERVICE_GRPC_PORT}'
deploy:
restart_policy:
condition: on-failure
rabbitmq:
container_name: rabbitmq
image: rabbitmq:4-management
volumes:
- ./rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
- ./rabbitmq/cert:/etc/rabbitmq/cert
environment:
RABBITMQ_CONFIG_FILE: /etc/rabbitmq/rabbitmq.conf
ports:
- '${RABBITMQ_PORT}:${RABBITMQ_PORT}'
- '15672:15672'
- '15692:15692'
postgres:
container_name: postgres
restart: always
volumes:
- ./database/postgresql/postgresql.conf:/var/lib/postgresql/postgresql.conf
- ./database/postgresql/pg_hba.conf:/var/lib/postgresql/pg_hba.conf
build:
context: .
dockerfile: database/postgresql/Dockerfile
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- '${POSTGRES_PORT_LOCAL}:${POSTGRES_PORT}'
command:
[
'postgres',
'-c',
'config_file=/var/lib/postgresql/postgresql.conf',
'-c',
'hba_file=/var/lib/postgresql/pg_hba.conf',
]
postgres-exporter:
container_name: postgres-exporter
image: prometheuscommunity/postgres-exporter:v0.13.1
environment:
DATA_SOURCE_URI: ${POSTGRES_ROOT_URL}
DATA_SOURCE_USER: ${POSTGRES_USER}
DATA_SOURCE_PASS: ${POSTGRES_PASSWORD}
ports:
- '9187:9187'
depends_on:
- postgres
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:8
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: admin@gmail.com
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- '5050:80'
volumes:
- pgadmin-data:/var/lib/pgadmin
prometheus:
container_name: prometheus
image: prom/prometheus:v2.53.2
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.enable-lifecycle'
- '--web.enable-admin-api'
- '--web.config.file=/etc/prometheus/web-config.yml'
ports:
- 9090:9090
deploy:
placement:
constraints:
- node.role==manager
restart_policy:
condition: on-failure
grafana:
container_name: grafana
image: grafana/grafana:11.4.0
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/provisioning/:/etc/grafana/provisioning/
- ./grafana/cert/:/etc/grafana/cert/
env_file:
- ./grafana/.env.dev
restart: always
depends_on:
- prometheus
ports:
- 9100:9100
volumes:
pgadmin-data: {}
prometheus_data: {}
grafana_data: {}
file_service_static_data:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: 'static'