sonda/compose.yaml
tgiachi 482644a7bf docs: the Docker image is published
The image is on the registry of git.kmalloc.org: git.kmalloc.org/squid/sonda:latest and
a tag with the commit. The README says so, with the commands for pulling and running
it, and compose.yaml says how to use it instead of building.
2026-11-16 12:51:50 +01:00

30 lines
1.5 KiB
YAML

# An example for running Sonda with Docker Compose. Put the secret in a file named .env next to
# this one (it is not committed):
#
# SONDA_JWT_SECRET=<output of: openssl rand -hex 32>
# MUSIC_DIR=/path/to/your/music
# SONDA_PORT=8080 # optional, the port on this machine
#
# then: docker compose up -d --build
#
# To use the image that is published, and not build one: delete the two lines "build: ." and "image: sonda:local" below,
# put "image: git.kmalloc.org/squid/sonda:latest" in their place, and run: docker compose pull && docker compose up -d
services:
sonda:
build: .
image: sonda:local
restart: unless-stopped
stop_grace_period: 15s # Sonda waits up to 10 seconds for the requests in progress when it is stopped
# Only this machine can reach it. To serve your network, publish "${SONDA_PORT:-8080}:8080" instead,
# and put a reverse proxy with https in front of it.
ports:
- "127.0.0.1:${SONDA_PORT:-8080}:8080"
environment:
SONDA_JWT_SECRET: ${SONDA_JWT_SECRET:?set SONDA_JWT_SECRET in .env (openssl rand -hex 32)}
# TZ: Europe/Rome
volumes:
- sonda-data:/data # the database and the files Sonda makes: back up the database
- ${MUSIC_DIR:?set MUSIC_DIR in .env to the folder of your music}:/music:ro # your music, read-only: a library is added with the path /music. To let Sonda delete duplicate files, drop ":ro" and set SONDA_ALLOW_DELETE: "true" above
volumes:
sonda-data: