fix(docker-compose): Add healthcheck for Lavalink service and update depends_on condition

This commit is contained in:
Jose Daniel G. Percy 2025-04-24 01:22:09 +08:00
parent a54becb3a0
commit bb7a796cf9

View File

@ -11,6 +11,13 @@ services:
- LAVALINK_SERVER_PASSWORD=${LAVALINK_PASSWORD}
volumes:
- ./application.yml:/opt/Lavalink/application.yml:ro,Z
# Add healthcheck to verify Lavalink is ready
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:2333/v4/info"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s # Give Lavalink time to start up initially
bot:
build: .
@ -24,8 +31,10 @@ services:
- LAVALINK_HOST=lavalink
- LAVALINK_PORT=2333
- LAVALINK_PASSWORD=${LAVALINK_PASSWORD}
# Update depends_on to wait for healthcheck
depends_on:
- lavalink
lavalink:
condition: service_healthy
networks:
bot-network: