Implement Docker packaging and deployment #15

Closed
opened 2026-03-17 16:33:56 -04:00 by connor · 0 comments
Owner

Shanty should be easy to self-host. A Docker image is the most common way people deploy self-hosted media apps. This issue covers creating a Docker setup for Shanty.

  1. Dockerfile — multi-stage build:

    • Builder stage: compile the Rust workspace and Elm frontend
    • Runtime stage: minimal image (e.g., debian-slim or alpine) with just the compiled binary, frontend assets, and runtime dependencies (yt-dlp, ffmpeg)
    • Include yt-dlp and ffmpeg in the runtime image (needed for downloading/conversion)
  2. compose.yml — example compose file with:

    • The Shanty service
    • Volume mounts for music library, config, and database
    • Environment variable configuration
    • Example port mapping
  3. Documentation — a section in the README or a dedicated DOCKER.md explaining:

    • How to build and run with Docker
    • Volume mount requirements
    • Environment variable configuration
    • Example docker-compose setup

Acceptance Criteria

  • docker build produces a working image
  • The container starts and the web UI is accessible
  • Music library directory can be mounted as a volume
  • Database persists across container restarts (via volume)
  • Config can be provided via volume mount or environment variables
  • yt-dlp and ffmpeg are available inside the container
  • docker-compose.yml works out of the box for basic usage
  • Image size is reasonable (under 500MB)

Dependencies

  • Issue #9 (web backend)
  • Issue #10 (Elm frontend)
  • Issue #11 (configuration and startup)
Shanty should be easy to self-host. A Docker image is the most common way people deploy self-hosted media apps. This issue covers creating a Docker setup for Shanty. 1. **Dockerfile** — multi-stage build: - Builder stage: compile the Rust workspace and Elm frontend - Runtime stage: minimal image (e.g., `debian-slim` or `alpine`) with just the compiled binary, frontend assets, and runtime dependencies (`yt-dlp`, `ffmpeg`) - Include `yt-dlp` and `ffmpeg` in the runtime image (needed for downloading/conversion) 2. **compose.yml** — example compose file with: - The Shanty service - Volume mounts for music library, config, and database - Environment variable configuration - Example port mapping 3. **Documentation** — a section in the README or a dedicated `DOCKER.md` explaining: - How to build and run with Docker - Volume mount requirements - Environment variable configuration - Example docker-compose setup ### Acceptance Criteria - [ ] `docker build` produces a working image - [ ] The container starts and the web UI is accessible - [ ] Music library directory can be mounted as a volume - [ ] Database persists across container restarts (via volume) - [ ] Config can be provided via volume mount or environment variables - [ ] `yt-dlp` and `ffmpeg` are available inside the container - [ ] `docker-compose.yml` works out of the box for basic usage - [ ] Image size is reasonable (under 500MB) ### Dependencies - Issue #9 (web backend) - Issue #10 (Elm frontend) - Issue #11 (configuration and startup)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Shanty/Main#15