diff --git a/docker-compose.yml b/docker-compose.yml index 609dfd5..4104c22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: