<,<
This commit is contained in:
@@ -8,14 +8,12 @@ services:
|
||||
ports:
|
||||
- "2333:2333"
|
||||
environment:
|
||||
LAVALINK_SERVER_PASSWORD: ${LAVALINK_PASSWORD}
|
||||
# Add environment variable for plugin URLs (using the format you provided)
|
||||
LAVALINK_PLUGIN_URLS: |
|
||||
https://github.com/lavalink-devs/youtube-source/releases/download/1.12.0/youtube-plugin-1.12.0.jar
|
||||
- LAVALINK_SERVER_PASSWORD=${LAVALINK_PASSWORD}
|
||||
# Removed LAVALINK_PLUGIN_URLS environment variable
|
||||
volumes:
|
||||
- ./application.yml:/opt/Lavalink/application.yml:ro,Z
|
||||
# Optional: Persist downloaded plugins if needed, though downloading on start is fine
|
||||
# - lavalink-plugins:/plugins
|
||||
# Mount local plugins directory into the container
|
||||
- ./plugins:/plugins:ro
|
||||
# Add healthcheck to verify Lavalink is ready
|
||||
healthcheck:
|
||||
# Use CMD-SHELL to allow environment variable expansion for the password
|
||||
@@ -24,22 +22,7 @@ services:
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 15s # Give Lavalink time to start up initially
|
||||
# Override entrypoint/command to download plugins first
|
||||
command: >
|
||||
sh -c "
|
||||
apk add --no-cache curl && \
|
||||
mkdir -p /plugins && \
|
||||
echo 'Downloading Lavalink plugins...' && \
|
||||
echo \"$$LAVALINK_PLUGIN_URLS\" | while IFS= read -r url; do \
|
||||
if [ -n \"$$url\" ]; then \
|
||||
filename=$(basename \"$$url\") && \
|
||||
echo \"Downloading $$url to /plugins/$$filename\" && \
|
||||
curl -L -o \"/plugins/$$filename\" \"$$url\"; \
|
||||
fi \
|
||||
done && \
|
||||
echo 'Downloads complete. Starting Lavalink...' && \
|
||||
java -jar Lavalink.jar
|
||||
"
|
||||
# Removed command override, will use default image entrypoint
|
||||
|
||||
bot:
|
||||
build: .
|
||||
|
||||
Reference in New Issue
Block a user