mirror of
https://github.com/Dokploy/templates.git
synced 2026-07-16 11:25:25 +02:00
NodeLink requires the Authorization header on every API route, including /version, so the healthcheck's unauthenticated fetch always got a 401 and the container stayed permanently unhealthy. Traefik skips unhealthy containers, so the assigned domain returned a sustained 404 even though the deploy finished successfully. Pass the container's NODELINK_SERVER_PASSWORD as the Authorization header in the healthcheck fetch; the container now reaches a healthy state and the domain routes to the server (401 on / without credentials, 200 on /version with the password), as expected for a Lavalink-compatible server. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
nodelink:
|
|
image: performanc/nodelink:3.8.0
|
|
restart: unless-stopped
|
|
expose:
|
|
- "2333"
|
|
environment:
|
|
NODELINK_SERVER_HOST: 0.0.0.0
|
|
NODELINK_SERVER_PORT: "2333"
|
|
NODELINK_SERVER_PASSWORD: ${NODELINK_SERVER_PASSWORD}
|
|
NODELINK_LOGGING_LEVEL: ${NODELINK_LOGGING_LEVEL}
|
|
NODELINK_LOGGING_FILE_ENABLED: ${NODELINK_LOGGING_FILE_ENABLED}
|
|
NODELINK_SOURCES_LOCAL_ENABLED: ${NODELINK_SOURCES_LOCAL_ENABLED}
|
|
NODELINK_SOURCES_LOCAL_BASEPATH: /app/local-music/
|
|
NODELINK_METRICS_ENABLED: ${NODELINK_METRICS_ENABLED}
|
|
volumes:
|
|
- nodelink-cache:/app/.cache
|
|
- nodelink-local-music:/app/local-music
|
|
- nodelink-logs:/app/logs
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"node -e \"fetch('http://127.0.0.1:2333/version',{headers:{authorization:process.env.NODELINK_SERVER_PASSWORD||''}}).then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\"",
|
|
]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
nodelink-cache:
|
|
nodelink-local-music:
|
|
nodelink-logs:
|