mirror of
https://github.com/labring/FastGPT.git
synced 2026-02-27 01:02:22 +08:00
feat: add health check to MongoDB service in Docker Compose templates (#5776)
* feat: add health check to MongoDB service in Docker Compose templates - Add health check configuration to MongoDB service in both dev and prod templates - Use mongo client ping command with authentication to verify service availability - Configure 10s interval, 5s timeout, 5 retries, and 30s start period - Ensures MongoDB service health monitoring consistent with other services Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering> * chore: regenerate Docker Compose files with MongoDB health check - Run pnpm gen:deploy to regenerate all Docker Compose files - MongoDB health checks are now included in all generated variants - Health check configuration: 10s interval, 5s timeout, 5 retries, 30s start period - Affects dev, prod and documentation Docker Compose files Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -99,6 +99,12 @@ services:
|
||||
- MONGO_INITDB_ROOT_PASSWORD=mypassword
|
||||
volumes:
|
||||
- ./mongo/data:/data/db
|
||||
healthcheck:
|
||||
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
entrypoint:
|
||||
- bash
|
||||
- -c
|
||||
|
||||
@@ -76,6 +76,12 @@ services:
|
||||
- MONGO_INITDB_ROOT_PASSWORD=mypassword
|
||||
volumes:
|
||||
- ./mongo/data:/data/db
|
||||
healthcheck:
|
||||
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
entrypoint:
|
||||
- bash
|
||||
- -c
|
||||
|
||||
@@ -57,6 +57,12 @@ services:
|
||||
- MONGO_INITDB_ROOT_PASSWORD=mypassword
|
||||
volumes:
|
||||
- ./mongo/data:/data/db
|
||||
healthcheck:
|
||||
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
entrypoint:
|
||||
- bash
|
||||
- -c
|
||||
|
||||
@@ -40,6 +40,12 @@ services:
|
||||
- MONGO_INITDB_ROOT_PASSWORD=mypassword
|
||||
volumes:
|
||||
- ./mongo/data:/data/db
|
||||
healthcheck:
|
||||
test: ['CMD', 'mongo', '-u', 'myusername', '-p', 'mypassword', '--authenticationDatabase', 'admin', '--eval', "db.adminCommand('ping')"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
entrypoint:
|
||||
- bash
|
||||
- -c
|
||||
|
||||
Reference in New Issue
Block a user