[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>
This commit is contained in:
0zul
2026-01-07 23:54:55 +05:30
committed by GitHub
parent 294421a380
commit 2199d1d152
4 changed files with 230 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
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'

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 100 100"
width="100%"
height="100%"
version="1.1"
id="svg13"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs7">
<linearGradient
id="grad"
x1="0"
y1="0"
x2="100"
y2="100"
spreadMethod="pad"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#ff8c00"
id="stop2"
style="stop-color:#fa9800;stop-opacity:1;" />
<stop
offset="100"
stop-color="#ff0000"
id="stop4"
style="stop-color:#ff005e;stop-opacity:1;" />
</linearGradient>
</defs>
<rect
width="100%"
height="100%"
fill="url(#grad)"
id="rect9"
x="0"
y="0"
rx="14"
ry="14"
style="fill:url(#grad)" />
<path
style="vector-effect:none;fill:#ffffff;fill-opacity:1;stroke-width:1.27808;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000"
d="m 57,25 h 13 l -7,27 h 12 l -2,8.5 H 48 Z"
id="path724-5" />
<path
style="opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;stroke-width:1.33907;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-color:#000000;stop-opacity:1"
d="m 37.5,25 h 14 l -10,40 H 72 L 70,75 H 25 Z"
id="path724" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,123 @@
[variables]
main_domain = "${domain}"
server_port = "2333"
lavalink_server_password = "${password}"
[config]
[[config.mounts]]
filePath = "./application.yml"
content = """
server: # REST and WS server
port: 2333
address: 0.0.0.0
http2:
enabled: false
plugins:
# name: # Name of the plugin
# some_key: some_value # Some key-value pair for the plugin
# another_key: another_value
lavalink:
plugins:
# - dependency: "com.github.username.pluginName:pluginName-plugin:x.y.z"
# snapshot: false
# pluginsDir: "/opt/Lavalink/plugins"
# defaultPluginRepository: "https://maven.lavalink.dev/releases"
# defaultPluginSnapshotRepository: "https://maven.lavalink.dev/snapshots"
server:
password: "youshallnotpass"
sources:
# The default Youtube source is now deprecated and won't receive further updates. Please use https://github.com/lavalink-devs/youtube-source#plugin instead.
youtube: true
bandcamp: true
soundcloud: true
twitch: true
vimeo: true
nico: true
http: true
local: false
filters:
volume: true
equalizer: true
karaoke: true
timescale: true
tremolo: true
vibrato: true
distortion: true
rotation: true
channelMix: true
lowPass: true
nonAllocatingFrameBuffer: false
bufferDurationMs: 400
frameBufferDurationMs: 5000
opusEncodingQuality: 10
resamplingQuality: LOW
trackStuckThresholdMs: 10000
useSeekGhosting: true
youtubePlaylistLoadLimit: 6
playerUpdateInterval: 5
youtubeSearchEnabled: true
soundcloudSearchEnabled: true
gc-warnings: true
#ratelimit:
#ipBlocks: ["1.0.0.0/8", "..."] # list of ip blocks
#excludedIps: ["...", "..."] # ips which should be explicit excluded from usage by lavalink
#strategy: "RotateOnBan" # RotateOnBan | LoadBalance | NanoSwitch | RotatingNanoSwitch
#searchTriggersFail: true # Whether a search 429 should trigger marking the ip as failing
#retryLimit: -1 # -1 = use default lavaplayer value | 0 = infinity | >0 = retry will happen this numbers times
#youtubeConfig: # Required for avoiding all age restrictions by YouTube, some restricted videos still can be played without.
#email: "" # Email of Google account
#password: "" # Password of Google account
#httpConfig: # Useful for blocking bad-actors from ip-grabbing your music node and attacking it, this way only the http proxy will be attacked
#proxyHost: "localhost" # Hostname of the proxy, (ip or domain)
#proxyPort: 3128 # Proxy port, 3128 is the default for squidProxy
#proxyUser: "" # Optional user for basic authentication fields, leave blank if you don't use basic auth
#proxyPassword: "" # Password for basic authentication
timeouts:
connectTimeoutMs: 3000
connectionRequestTimeoutMs: 3000
socketTimeoutMs: 3000
metrics:
prometheus:
enabled: false
endpoint: /metrics
sentry:
dsn: ""
environment: ""
# tags:
# some_key: some_value
# another_key: another_value
logging:
file:
path: ./logs/
level:
root: INFO
lavalink: INFO
request:
enabled: true
includeClientInfo: true
includeHeaders: false
includeQueryString: true
includePayload: true
maxPayloadLength: 10000
logback:
rollingpolicy:
max-file-size: 1GB
max-history: 30
"""
[[config.domains]]
serviceName = "lavalink"
port = 2_333
host = "${main_domain}"
[config.env]
_JAVA_OPTIONS = "-Xmx6G"
LAVALINK_SERVER_PASSWORD = "${lavalink_server_password}"
SERVER_PORT = "${server_port}"

View File

@@ -3390,6 +3390,22 @@
"ai"
]
},
{
"id": "lavalink",
"name": "Lavalink",
"version": "4.1.1",
"description": "Lavalink is an open source standalone audio sending node based on Lavaplayer.",
"logo": "lavalink.svg",
"links": {
"github": "https://github.com/lavalink-devs/Lavalink",
"website": "https://lavalink.dev/",
"docs": "https://lavalink.dev/getting-started/index.html"
},
"tags": [
"voice",
"discord"
]
},
{
"id": "letterfeed",
"name": "Letterfeed",