Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LLM-Filter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2026_NGIT
LLM-Filter
Commits
2c99e8f1
Commit
2c99e8f1
authored
Mar 04, 2026
by
uuo00_n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(docker): 添加健康检查和重启策略,优化服务依赖管理
parent
6b984a94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
docker-compose.yml
docker-compose.yml
+23
-7
No files found.
docker-compose.yml
View file @
2c99e8f1
...
@@ -3,6 +3,7 @@ services:
...
@@ -3,6 +3,7 @@ services:
postgres
:
postgres
:
image
:
postgres:15-alpine
image
:
postgres:15-alpine
container_name
:
llm-filter-db
container_name
:
llm-filter-db
restart
:
always
environment
:
environment
:
POSTGRES_USER
:
${DB_USER}
POSTGRES_USER
:
${DB_USER}
POSTGRES_PASSWORD
:
${DB_PASSWORD}
POSTGRES_PASSWORD
:
${DB_PASSWORD}
...
@@ -13,6 +14,11 @@ services:
...
@@ -13,6 +14,11 @@ services:
-
postgres_data:/var/lib/postgresql/data
-
postgres_data:/var/lib/postgresql/data
networks
:
networks
:
-
llm-network
-
llm-network
healthcheck
:
test
:
[
"
CMD-SHELL"
,
"
pg_isready
-U
${DB_USER}
-d
${DB_NAME}"
]
interval
:
10s
timeout
:
5s
retries
:
5
# Redis 缓存服务
# Redis 缓存服务
redis
:
redis
:
...
@@ -34,6 +40,7 @@ services:
...
@@ -34,6 +40,7 @@ services:
context
:
./microservices/auth-service
context
:
./microservices/auth-service
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
container_name
:
llm-filter-auth
container_name
:
llm-filter-auth
restart
:
always
ports
:
ports
:
-
"
${AUTH_SERVICE_PORT:-8081}:8081"
-
"
${AUTH_SERVICE_PORT:-8081}:8081"
environment
:
environment
:
...
@@ -48,7 +55,8 @@ services:
...
@@ -48,7 +55,8 @@ services:
-
ADMIN_EMAIL=${ADMIN_EMAIL}
-
ADMIN_EMAIL=${ADMIN_EMAIL}
-
TZ=${TZ}
-
TZ=${TZ}
depends_on
:
depends_on
:
-
postgres
postgres
:
condition
:
service_healthy
networks
:
networks
:
-
llm-network
-
llm-network
...
@@ -58,6 +66,7 @@ services:
...
@@ -58,6 +66,7 @@ services:
context
:
./microservices/edu-service
context
:
./microservices/edu-service
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
container_name
:
llm-filter-edu
container_name
:
llm-filter-edu
restart
:
always
ports
:
ports
:
-
"
${EDU_SERVICE_PORT:-8082}:8082"
-
"
${EDU_SERVICE_PORT:-8082}:8082"
environment
:
environment
:
...
@@ -77,8 +86,10 @@ services:
...
@@ -77,8 +86,10 @@ services:
-
SPRING_REDIS_PORT=${REDIS_PORT}
-
SPRING_REDIS_PORT=${REDIS_PORT}
-
TZ=${TZ}
-
TZ=${TZ}
depends_on
:
depends_on
:
-
postgres
postgres
:
-
redis
condition
:
service_healthy
redis
:
condition
:
service_started
networks
:
networks
:
-
llm-network
-
llm-network
...
@@ -176,6 +187,7 @@ services:
...
@@ -176,6 +187,7 @@ services:
gateway
:
gateway
:
image
:
nginx:alpine
image
:
nginx:alpine
container_name
:
llm-filter-gateway
container_name
:
llm-filter-gateway
restart
:
always
ports
:
ports
:
-
"
${GATEWAY_PORT:-8080}:80"
-
"
${GATEWAY_PORT:-8080}:80"
volumes
:
volumes
:
...
@@ -183,10 +195,14 @@ services:
...
@@ -183,10 +195,14 @@ services:
environment
:
environment
:
-
TZ=${TZ}
-
TZ=${TZ}
depends_on
:
depends_on
:
-
auth-service
auth-service
:
-
edu-service
condition
:
service_started
-
llm-service
edu-service
:
-
security-service
condition
:
service_started
llm-service
:
condition
:
service_started
security-service
:
condition
:
service_started
networks
:
networks
:
-
llm-network
-
llm-network
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment