-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.override.yaml
More file actions
245 lines (222 loc) · 6.2 KB
/
Copy pathdocker-compose.override.yaml
File metadata and controls
245 lines (222 loc) · 6.2 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
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
version: "3.8"
services:
# Overrides
kafka:
ports:
- 9092:9092
frontend:
ports:
- 80:80
gateway-service:
ports:
- 3000:3000
panel-service:
depends_on:
- panel-service-migrations
post-service:
depends_on:
- post-service-migrations
auth-service:
depends_on:
- auth-service-migrations
comment-service:
depends_on:
- comment-service-migrations
# Migrations
panel-service-migrations:
image: migrate/migrate:4
command: "-path=/migrations -database postgresql://postgres:postgres@panel-service-postgres:5432/postgres?sslmode=disable up"
volumes:
- ./services/panel-service/internal/postgres/migrations:/migrations
depends_on:
panel-service-postgres:
condition: service_healthy
networks:
- panel-service-network
post-service-migrations:
image: migrate/migrate:4
command: "-path=/migrations -database postgresql://postgres:postgres@post-service-postgres:5432/postgres?sslmode=disable up"
volumes:
- ./services/post-service/internal/postgres/migrations:/migrations
depends_on:
post-service-postgres:
condition: service_healthy
networks:
- post-service-network
auth-service-migrations:
image: migrate/migrate:4
command: "-path=/migrations -database postgresql://postgres:postgres@auth-service-postgres:5432/postgres?sslmode=disable up"
volumes:
- ./services/auth-service/auth_service/postgres/migrations:/migrations
depends_on:
auth-service-postgres:
condition: service_healthy
networks:
- auth-service-network
comment-service-migrations:
image: migrate/migrate:4
command: "-path=/migrations -database postgresql://postgres:postgres@comment-service-postgres:5432/postgres?sslmode=disable up"
volumes:
- ./services/comment-service/comment_service/postgres/migrations:/migrations
depends_on:
comment-service-postgres:
condition: service_healthy
networks:
- comment-service-network
# Postgres Instances
panel-service-postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- panel-service-postgres-volume:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready", "--dbname={POSTGRES_DB}"]
interval: 30s
timeout: 15s
retries: 3
start_period: 30s
ports:
- 5432:5432
networks:
- panel-service-network
post-service-postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "--dbname={POSTGRES_DB}"]
interval: 30s
timeout: 15s
retries: 3
start_period: 30s
volumes:
- post-service-postgres-volume:/var/lib/postgresql
ports:
- 5433:5432
networks:
- post-service-network
auth-service-postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "--dbname={POSTGRES_DB}"]
interval: 30s
timeout: 15s
retries: 3
start_period: 30s
volumes:
- auth-service-postgres-volume:/var/lib/postgresql
ports:
- 5434:5432
networks:
- auth-service-network
comment-service-postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "--dbname={POSTGRES_DB}"]
interval: 30s
timeout: 15s
retries: 3
start_period: 30s
volumes:
- comment-service-postgres-volume:/var/lib/postgresql
ports:
- 5435:5432
networks:
- comment-service-network
# Redis Instances
panel-service-redis:
image: redis:8.6
restart: unless-stopped
command: redis-server --requirepass redis --maxmemory 250mb --maxmemory-policy allkeys-lru
ports:
- 6379:6379
networks:
- panel-service-network
post-service-redis:
image: redis:8.6
restart: unless-stopped
command: redis-server --requirepass redis --maxmemory 250mb --maxmemory-policy allkeys-lru
ports:
- 6380:6379
networks:
- post-service-network
comment-service-redis:
image: redis:8.6
restart: unless-stopped
command: "redis-server --requirepass redis --maxmemory 250mb --maxmemory-policy allkeys-lru"
ports:
- 6381:6379
networks:
- comment-service-network
# Mongo Instance
user-service-mongo:
image: mongo:7.0
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: "mongo"
MONGO_INITDB_ROOT_PASSWORD: "mongo"
MONGO_INITDB_DATABASE: "user"
volumes:
- user-service-mongo-volume:/data/db
ports:
- 27017:27017
networks:
- user-service-network
# Dev Tools
dev-kafka-ui:
image: provectuslabs/kafka-ui:latest
restart: unless-stopped
environment:
KAFKA_CLUSTERS_0_NAME: "panels"
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: "kafka:19092"
DYNAMIC_CONFIG_ENABLED: "true"
ports:
- 8080:8080
networks:
- services-network
dev-mongo-express:
image: mongo-express:latest
restart: unless-stopped
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: "mongo"
ME_CONFIG_MONGODB_ADMINPASSWORD: "mongo"
ME_CONFIG_MONGODB_URL: "mongodb://mongo:mongo@user-service-mongo:27017/"
ports:
- 8081:8081
networks:
- user-service-network
dev-adminer:
image: adminer:latest
restart: unless-stopped
environment:
ADMINER_DEFAULT_SERVER: "post-service-postgres:5432"
ports:
- 8082:8080
networks:
- panel-service-network
- post-service-network
- auth-service-network
- comment-service-network
volumes:
panel-service-postgres-volume:
post-service-postgres-volume:
user-service-mongo-volume:
auth-service-postgres-volume:
comment-service-postgres-volume: