feat(server): Dockerfile and compose for the Lidarr stack

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 20:21:14 -07:00
parent 5b6986e01c
commit 809de44e2e
3 changed files with 45 additions and 0 deletions

5
server/.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
__pycache__/
*.pyc
tests/
docs/
.git/

15
server/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM python:3.12-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY server/requirements.txt /app/server/requirements.txt
RUN pip install --no-cache-dir -r /app/server/requirements.txt yt-dlp
COPY musicfetch /app/musicfetch
COPY server /app/server
EXPOSE 6769
CMD ["sh", "-c", "uvicorn server.app:app --host 0.0.0.0 --port ${MUSICFETCH_PORT:-6769}"]

25
server/docker-compose.yml Normal file
View File

@@ -0,0 +1,25 @@
services:
musicfetch-api:
build:
context: ..
dockerfile: server/Dockerfile
container_name: musicfetch-api
restart: unless-stopped
ports:
- "6769:6769"
environment:
LIDARR_URL: "http://lidarr:8686"
LIDARR_API_KEY: "${LIDARR_API_KEY}"
MUSICFETCH_API_KEY: "${MUSICFETCH_API_KEY}"
MUSICFETCH_ROOT: "/media/music"
MUSICFETCH_PORT: "6769"
volumes:
- /media/music:/media/music
networks:
- lidarr_net
networks:
lidarr_net:
external: true
# Set to the actual network name of your existing Lidarr stack, e.g.:
# name: media_default