Remove deprecated 'depends_on' entries in deploy-compose.swarm.yml and add healthcheck configurations for MongoDB and MeiliSearch services.
This commit is contained in:
@@ -9,9 +9,11 @@ services:
|
||||
image: ghcr.io/danny-avila/librechat-dev-api:latest
|
||||
# ports:
|
||||
# - 3080:3080
|
||||
depends_on:
|
||||
- mongodb
|
||||
- rag_api
|
||||
# Note: depends_on is ignored in Docker Swarm mode
|
||||
# Services start in parallel, so API must handle connection retries
|
||||
# depends_on:
|
||||
# - mongodb
|
||||
# - rag_api
|
||||
networks:
|
||||
- net
|
||||
extra_hosts:
|
||||
@@ -63,8 +65,9 @@ services:
|
||||
# ports:
|
||||
# - 80:80
|
||||
# - 443:443
|
||||
depends_on:
|
||||
- api
|
||||
# Note: depends_on is ignored in Docker Swarm mode
|
||||
# depends_on:
|
||||
# - api
|
||||
networks:
|
||||
- net
|
||||
- badge-net
|
||||
@@ -94,6 +97,12 @@ services:
|
||||
volumes:
|
||||
- librechat-mongodb:/data/db
|
||||
command: mongod --noauth
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mongosh --eval 'db.adminCommand(\"ping\")' --quiet || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
@@ -122,6 +131,12 @@ services:
|
||||
- MEILI_NO_ANALYTICS=true
|
||||
volumes:
|
||||
- librechat-meili_data:/meili_data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:7700/health || wget --spider -q http://localhost:7700/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
deploy:
|
||||
replicas: 1
|
||||
restart_policy:
|
||||
@@ -175,8 +190,9 @@ services:
|
||||
- RAG_PORT=${RAG_PORT:-8000}
|
||||
networks:
|
||||
- net
|
||||
depends_on:
|
||||
- vectordb
|
||||
# Note: depends_on is ignored in Docker Swarm mode
|
||||
# depends_on:
|
||||
# - vectordb
|
||||
env_file:
|
||||
- stack.env
|
||||
healthcheck:
|
||||
@@ -202,8 +218,9 @@ services:
|
||||
|
||||
metrics:
|
||||
image: ghcr.io/virtuos/librechat_exporter:main
|
||||
depends_on:
|
||||
- mongodb
|
||||
# Note: depends_on is ignored in Docker Swarm mode
|
||||
# depends_on:
|
||||
# - mongodb
|
||||
# ports:
|
||||
# - "8000:8000"
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user