42 lines
1011 B
YAML
42 lines
1011 B
YAML
services:
|
|
lavalink:
|
|
image: fredboat/lavalink:latest
|
|
container_name: lavalink
|
|
restart: unless-stopped
|
|
networks:
|
|
- bot-network
|
|
ports:
|
|
- "2333:2333"
|
|
environment:
|
|
- 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: .
|
|
container_name: discord-music-bot
|
|
restart: unless-stopped
|
|
networks:
|
|
- bot-network
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- LAVALINK_HOST=lavalink
|
|
- LAVALINK_PORT=2333
|
|
- LAVALINK_PASSWORD=${LAVALINK_PASSWORD}
|
|
# Update depends_on to wait for healthcheck
|
|
depends_on:
|
|
lavalink:
|
|
condition: service_healthy
|
|
|
|
networks:
|
|
bot-network:
|
|
driver: bridge
|