-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.integration.yaml
More file actions
360 lines (342 loc) · 13 KB
/
Copy pathcompose.integration.yaml
File metadata and controls
360 lines (342 loc) · 13 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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
name: ${COMPOSE_PROJECT_NAME:-galreview-integration}
services:
user-mysql:
image: mysql:8.4
environment:
MYSQL_ROOT_PASSWORD: ${USER_MYSQL_ROOT_PASSWORD:-user-root-dev-password}
MYSQL_DATABASE: galreview_user
MYSQL_USER: galreview_user
MYSQL_PASSWORD: ${USER_MYSQL_PASSWORD:-user-dev-password}
volumes:
- user-mysql-data:/var/lib/mysql
healthcheck:
test:
- CMD-SHELL
- mysqladmin ping -h 127.0.0.1 -uroot -p"$${MYSQL_ROOT_PASSWORD}" --silent
interval: 5s
timeout: 5s
retries: 30
start_period: 20s
restart: unless-stopped
auth-mysql:
image: mysql:8.4
environment:
MYSQL_ROOT_PASSWORD: ${AUTH_MYSQL_ROOT_PASSWORD:-auth-root-dev-password}
MYSQL_DATABASE: galreview_auth
MYSQL_USER: galreview_auth
MYSQL_PASSWORD: ${AUTH_MYSQL_PASSWORD:-auth-dev-password}
volumes:
- auth-mysql-data:/var/lib/mysql
healthcheck:
test:
- CMD-SHELL
- mysqladmin ping -h 127.0.0.1 -uroot -p"$${MYSQL_ROOT_PASSWORD}" --silent
interval: 5s
timeout: 5s
retries: 30
start_period: 20s
restart: unless-stopped
credit-mysql:
image: mysql:8.4
environment:
MYSQL_ROOT_PASSWORD: ${CREDIT_MYSQL_ROOT_PASSWORD:-credit-root-dev-password}
MYSQL_DATABASE: qzwl_credit
MYSQL_USER: qzwl_credit
MYSQL_PASSWORD: ${CREDIT_MYSQL_PASSWORD:-credit-dev-password}
volumes:
- credit-mysql-data:/var/lib/mysql
healthcheck:
test:
- CMD-SHELL
- mysqladmin ping -h 127.0.0.1 -uroot -p"$${MYSQL_ROOT_PASSWORD}" --silent
interval: 5s
timeout: 5s
retries: 30
start_period: 20s
restart: unless-stopped
mongo:
image: mongo:8.0
volumes:
- file-mongo-data:/data/db
healthcheck:
test:
- CMD
- mongosh
- --quiet
- --eval
- db.adminCommand('ping').ok
interval: 5s
timeout: 5s
retries: 30
restart: unless-stopped
neo4j:
image: neo4j:2026.06.0
environment:
NEO4J_AUTH: neo4j/${NEO4J_PASSWORD:-knowledge-dev-password}
HEALTHCHECK_PASSWORD: ${NEO4J_PASSWORD:-knowledge-dev-password}
ports:
- "${DIAGNOSTIC_BIND_ADDRESS:-127.0.0.1}:${NEO4J_BROWSER_HOST_PORT:-5254}:7474"
- "${DIAGNOSTIC_BIND_ADDRESS:-127.0.0.1}:${NEO4J_BOLT_HOST_PORT:-5255}:7687"
volumes:
- knowledge-neo4j-data:/data
healthcheck:
test:
- CMD-SHELL
- >-
cypher-shell -a bolt://127.0.0.1:7687 -u neo4j -p "$${HEALTHCHECK_PASSWORD}"
"RETURN 1" >/dev/null 2>&1
interval: 5s
timeout: 5s
retries: 30
restart: unless-stopped
user-service:
build:
context: ./backend/UserService
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5101
MOONSTONE_MODE: ${USER_SERVICE_MODE:-Mock}
Gateway__ServiceKey: ${USER_SERVICE_KEY:-moonstone-local-gateway-key}
ConnectionStrings__UserDatabase: "Server=user-mysql;Port=3306;Database=galreview_user;User ID=galreview_user;Password=${USER_MYSQL_PASSWORD:-user-dev-password};SslMode=Disabled;AllowPublicKeyRetrieval=True"
depends_on:
user-mysql:
condition: service_healthy
restart: unless-stopped
auth-service:
build:
context: ./backend/AuthService
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5102
MOONSTONE_MODE: ${AUTH_SERVICE_MODE:-Mock}
Gateway__BaseUrl: http://gateway:5000
Gateway__ServiceKey: ${AUTH_SERVICE_KEY:-moonstone-local-gateway-key}
Admin__Username: ${GALREVIEW_ADMIN_USERNAME:-integration-admin}
Admin__PasswordHash: ${GALREVIEW_ADMIN_PASSWORD_HASH:-AQAAAAIAAYagAAAAEOIs88DOZMchn4fIBwH9hLGMtw0+x+Y9rfbC1PiqJV76ncVm45+6INHh0elONRn5cg==}
Email__SmtpHost: ${SMTP_HOST:-}
Email__SmtpPort: ${SMTP_PORT:-465}
Email__UseSsl: ${SMTP_USE_SSL:-true}
Email__Username: ${SMTP_USERNAME:-}
Email__Password: ${SMTP_PASSWORD:-}
Email__FromAddress: ${SMTP_FROM_ADDRESS:-}
Email__FromName: ${SMTP_FROM_NAME:-GalReview}
AccountFrontend__BaseUrl: ${ACCOUNT_FRONTEND_BASE_URL:-http://localhost:5120}
ConnectionStrings__AuthDatabase: "Server=auth-mysql;Port=3306;Database=galreview_auth;User ID=galreview_auth;Password=${AUTH_MYSQL_PASSWORD:-auth-dev-password};SslMode=Disabled;AllowPublicKeyRetrieval=True"
depends_on:
auth-mysql:
condition: service_healthy
user-service:
condition: service_healthy
credit-service:
condition: service_healthy
restart: unless-stopped
credit-service:
build:
context: ./backend/CreditService
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5108
Gateway__ServiceKey: ${CREDIT_SERVICE_KEY:-moonstone-local-gateway-key}
ConnectionStrings__CreditDatabase: "Server=credit-mysql;Port=3306;Database=qzwl_credit;User ID=qzwl_credit;Password=${CREDIT_MYSQL_PASSWORD:-credit-dev-password};SslMode=Disabled;AllowPublicKeyRetrieval=True"
CreditStore__Provider: MySQL
depends_on:
credit-mysql:
condition: service_healthy
restart: unless-stopped
file-service:
build:
context: ./backend/FileService
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5103
Gateway__ServiceKey: ${FILE_SERVICE_KEY:-moonstone-local-gateway-key}
ConnectionStrings__FileDatabase: mongodb://mongo:27017/qzwl_file
MongoDb__Database: qzwl_file
InternalAccess__ExtractedTextAllowedServices__0: KnowledgeService
InternalAccess__ExtractedTextAllowedServices__1: PracticeService
Ocr__BaseUrl: http://ocr-service:5110/
Ocr__TimeoutMinutes: 20
depends_on:
mongo:
condition: service_healthy
restart: unless-stopped
knowledge-service:
build:
context: ./backend/KnowledgeService
dockerfile: KnowledgeService.API/Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:8080
Neo4j__Uri: bolt://neo4j:7687
Neo4j__Username: neo4j
Neo4j__Password: ${NEO4J_PASSWORD:-knowledge-dev-password}
Neo4j__Database: neo4j
GatewayMaterialText__BaseUrl: http://gateway:5000
GatewayMaterialText__ServiceName: KnowledgeService
GatewayMaterialText__ServiceKey: ${KNOWLEDGE_SERVICE_KEY:-moonstone-local-gateway-key}
Gateway__ServiceKey: ${KNOWLEDGE_SERVICE_KEY:-moonstone-local-gateway-key}
depends_on:
neo4j:
condition: service_healthy
ports:
- "${DIAGNOSTIC_BIND_ADDRESS:-127.0.0.1}:${KNOWLEDGE_HOST_PORT:-5104}:8080"
restart: unless-stopped
galgame-service:
build:
context: ./backend/GalGameService
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5105
Gateway__BaseUrl: http://gateway:5000
Gateway__ServiceKey: ${GALGAME_SERVICE_KEY:-moonstone-local-gateway-key}
InternalAccess__ValidationAllowedServices__0: RenderService
InternalAccess__PackageReaderAllowedServices__0: RenderService
ConnectionStrings__GameDatabase: mongodb://mongo:27017
MongoDb__Database: qzwl_galgame
GalGameStore__Provider: MongoDB
NarrativeGeneration__Enabled: ${GALGAME_NARRATIVE_ENABLED:-true}
NarrativeGeneration__ApiKey: ${DEEPSEEK_API_KEY:-}
NarrativeGeneration__Endpoint: ${GALGAME_NARRATIVE_ENDPOINT:-https://api.deepseek.com/chat/completions}
NarrativeGeneration__Model: ${GALGAME_NARRATIVE_MODEL:-deepseek-v4-pro}
NarrativeGeneration__PromptVersion: galgame-narrative-v3
VoiceSynthesis__Enabled: ${GALGAME_VOICE_ENABLED:-true}
VoiceSynthesis__ApiKey: ${MIMO_API_KEY:-}
VoiceSynthesis__Endpoint: ${MIMO_TTS_ENDPOINT:-https://api.xiaomimimo.com/v1/chat/completions}
VoiceSynthesis__Model: mimo-v2.5-tts
VoiceSynthesis__MaxConcurrency: ${MIMO_TTS_MAX_CONCURRENCY:-2}
depends_on:
knowledge-service:
condition: service_healthy
mongo:
condition: service_healthy
credit-service:
condition: service_healthy
restart: unless-stopped
render-service:
build:
context: ./backend/RenderService
environment:
PORT: 5106
RENDER_HOST: 0.0.0.0
Gateway__BaseUrl: http://gateway:5000
Gateway__ServiceName: RenderService
Gateway__ServiceKey: ${RENDER_SERVICE_KEY:-moonstone-local-gateway-key}
restart: unless-stopped
model-service:
build:
context: ./backend/ModelService
dockerfile: ModelService.API/Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5109
Gateway__ServiceKey: ${MODEL_SERVICE_KEY:-moonstone-local-gateway-key}
Nli__MinimumTopProbability: ${MODEL_NLI_MIN_TOP_PROBABILITY:-0.75}
Nli__MinimumMargin: ${MODEL_NLI_MIN_MARGIN:-0.20}
restart: unless-stopped
practice-service:
build:
context: ./backend/PracticeService
dockerfile: Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Production
ASPNETCORE_URLS: http://+:5107
Gateway__BaseUrl: http://gateway:5000
Gateway__ServiceName: PracticeService
Gateway__ServiceKey: ${PRACTICE_SERVICE_KEY:-moonstone-local-gateway-key}
ConnectionStrings__PracticeDatabase: mongodb://mongo:27017
MongoDb__Database: qzwl_practice
PracticeStore__Provider: MongoDB
QuestionGeneration__ApiKey: ${DEEPSEEK_API_KEY:-}
QuestionGeneration__Endpoint: ${PRACTICE_QUESTION_ENDPOINT:-https://api.deepseek.com/chat/completions}
QuestionGeneration__Model: ${PRACTICE_QUESTION_MODEL:-deepseek-v4-flash}
QuestionGeneration__Parallelism: ${PRACTICE_QUESTION_PARALLELISM:-4}
depends_on:
mongo:
condition: service_healthy
knowledge-service:
condition: service_started
credit-service:
condition: service_healthy
restart: unless-stopped
gateway:
build:
context: ./gateway
environment:
NODE_ENV: production
GATEWAY_HOST: 0.0.0.0
GATEWAY_PORT: 5000
GATEWAY_KEY: ${GATEWAY_KEY:-moonstone-local-gateway-key}
USER_SERVICE_KEY: ${USER_SERVICE_KEY:-moonstone-local-gateway-key}
AUTH_SERVICE_KEY: ${AUTH_SERVICE_KEY:-moonstone-local-gateway-key}
FILE_SERVICE_KEY: ${FILE_SERVICE_KEY:-moonstone-local-gateway-key}
KNOWLEDGE_SERVICE_KEY: ${KNOWLEDGE_SERVICE_KEY:-moonstone-local-gateway-key}
GALGAME_SERVICE_KEY: ${GALGAME_SERVICE_KEY:-moonstone-local-gateway-key}
RENDER_SERVICE_KEY: ${RENDER_SERVICE_KEY:-moonstone-local-gateway-key}
PRACTICE_SERVICE_KEY: ${PRACTICE_SERVICE_KEY:-moonstone-local-gateway-key}
CREDIT_SERVICE_KEY: ${CREDIT_SERVICE_KEY:-moonstone-local-gateway-key}
MODEL_SERVICE_KEY: ${MODEL_SERVICE_KEY:-moonstone-local-gateway-key}
USER_SERVICE_URL: http://user-service:5101
AUTH_SERVICE_URL: http://auth-service:5102
FILE_SERVICE_URL: http://file-service:5103
KNOWLEDGE_SERVICE_URL: http://knowledge-service:8080
GALGAME_SERVICE_URL: http://galgame-service:5105
RENDER_SERVICE_URL: http://render-service:5106
PRACTICE_SERVICE_URL: http://practice-service:5107
CREDIT_SERVICE_URL: http://credit-service:5108
MODEL_SERVICE_URL: http://model-service:5109
READINESS_SERVICES: userService,authService,fileService,knowledgeService,galGameService,renderService,practiceService,creditService,modelService
DEFAULT_TIMEOUT_MS: 30000
UPLOAD_TIMEOUT_MS: 120000
# 未设置时不采信 X-Forwarded-For(匿名限流按 socket 对端计量)。网关端口
# 若只经可信反代对外,可设为该代理的地址/网段,例如 TRUST_PROXY=172.18.0.0/16
TRUST_PROXY: ${TRUST_PROXY:-}
CORS_ORIGINS: ${CORS_ORIGINS:-http://localhost:5120,http://localhost:5121,http://localhost:5122}
depends_on:
user-service:
condition: service_healthy
auth-service:
condition: service_healthy
file-service:
condition: service_healthy
knowledge-service:
condition: service_healthy
galgame-service:
condition: service_healthy
render-service:
condition: service_healthy
practice-service:
condition: service_healthy
credit-service:
condition: service_healthy
model-service:
condition: service_healthy
ports:
- "${GATEWAY_BIND_ADDRESS:-127.0.0.1}:${GATEWAY_HOST_PORT:-5000}:5000"
restart: unless-stopped
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
environment:
GATEWAY_UPSTREAM: http://gateway:5000
PORT: 8080
depends_on:
gateway:
condition: service_healthy
ports:
- "${FRONTEND_BIND_ADDRESS:-0.0.0.0}:${FRONTEND_HOST_PORT:-5120}:8080"
restart: unless-stopped
ocr-service:
profiles:
- ocr
build:
context: ./backend/OCRService
environment:
GATEWAY_KEY: ${FILE_SERVICE_KEY:-moonstone-local-gateway-key}
restart: unless-stopped
volumes:
user-mysql-data:
auth-mysql-data:
credit-mysql-data:
file-mongo-data:
knowledge-neo4j-data: