Files
templates/blueprints/lavalink/docker-compose.yml
0zul 2199d1d152 [New Template] Added Lavalink template for dokploy (#535)
* Add initial Lavalink configuration template

* Added lavalink.svg logo

* Create docker-compose.yml for Lavalink setup

Add Docker Compose configuration for Lavalink service.

* Modify healthcheck interval in docker-compose.yml

Increased healthcheck interval from 10s to 100s.

* Add Lavalink metadata to meta.json

Added metadata for Lavalink audio sending node.

* Update server_port variable to use ${port}

* Change server port variable to randomPort

* Change port variable to randomPort in template.toml

* Change port variable in template.toml

* Update server port in template.toml

* Fix formatting in template.toml for server config

* style: Reformat lavalink entry in meta.json.

* Update docker-compose.yml

---------

Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
2026-01-07 12:24:55 -06:00

42 lines
1.4 KiB
YAML

services:
fix-perms:
image: busybox:1.36
command: >
sh -c "mkdir -p /opt/Lavalink/plugins &&
chmod -R 0777 /opt/Lavalink/plugins || true &&
chown -R 1000:1000 /opt/Lavalink/plugins || true &&
echo perms-fixed && sleep 1"
volumes:
- "../files/plugins/:/opt/Lavalink/plugins/"
- "../files/application.yml:/opt/Lavalink/application.yml"
restart: "no"
lavalink:
image: ghcr.io/lavalink-devs/lavalink:4
depends_on:
- fix-perms
restart: unless-stopped
environment:
_JAVA_OPTIONS: "${_JAVA_OPTIONS:--Xmx6G}"
LAVALINK_SERVER_PASSWORD: "${LAVALINK_SERVER_PASSWORD:-youshallnotpass}"
SERVER_PORT: "${SERVER_PORT:-2333}"
volumes:
- "../files/application.yml:/opt/Lavalink/application.yml:rw"
- "../files/plugins/:/opt/Lavalink/plugins/:rw"
ports:
- ${SERVER_PORT}
healthcheck:
test: >
sh -c 'wget --header="Authorization: ${LAVALINK_SERVER_PASSWORD}" -qO- http://127.0.0.1:${SERVER_PORT}/v4/info >/dev/null 2>&1 || exit 1'
interval: 100s
timeout: 5s
retries: 5
start_period: 30s
entrypoint: >
sh -c 'until [ -w /opt/Lavalink/plugins ] ; do
echo "waiting for /opt/Lavalink/plugins to be writable";
sleep 1;
done;
exec java -jar /opt/Lavalink/Lavalink.jar'