fix(docker-compose): Add healthcheck for Lavalink service and update depends_on condition
This commit is contained in:
parent
a54becb3a0
commit
bb7a796cf9
@ -11,6 +11,13 @@ services:
|
|||||||
- LAVALINK_SERVER_PASSWORD=${LAVALINK_PASSWORD}
|
- LAVALINK_SERVER_PASSWORD=${LAVALINK_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- ./application.yml:/opt/Lavalink/application.yml:ro,Z
|
- ./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:
|
bot:
|
||||||
build: .
|
build: .
|
||||||
@ -24,8 +31,10 @@ services:
|
|||||||
- LAVALINK_HOST=lavalink
|
- LAVALINK_HOST=lavalink
|
||||||
- LAVALINK_PORT=2333
|
- LAVALINK_PORT=2333
|
||||||
- LAVALINK_PASSWORD=${LAVALINK_PASSWORD}
|
- LAVALINK_PASSWORD=${LAVALINK_PASSWORD}
|
||||||
|
# Update depends_on to wait for healthcheck
|
||||||
depends_on:
|
depends_on:
|
||||||
- lavalink
|
lavalink:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
bot-network:
|
bot-network:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user