From 211f0c617c13d2eded65df098f9096fff2642202 Mon Sep 17 00:00:00 2001 From: V1ck3s Date: Sat, 13 Dec 2025 00:58:23 +0100 Subject: [PATCH] feat: add Dockerfile and docker-compose.yml for containerization --- Dockerfile | 27 +++++++++++++++++++++++++++ docker-compose.yml | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f49119c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# Build stage +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build +WORKDIR /src + +COPY octo-fiesta.sln . +COPY octo-fiesta/octo-fiesta.csproj octo-fiesta/ +COPY octo-fiesta.Tests/octo-fiesta.Tests.csproj octo-fiesta.Tests/ + +RUN dotnet restore + +COPY octo-fiesta/ octo-fiesta/ +COPY octo-fiesta.Tests/ octo-fiesta.Tests/ + +RUN dotnet publish octo-fiesta/octo-fiesta.csproj -c Release -o /app/publish + +# Runtime stage +FROM mcr.microsoft.com/dotnet/aspnet:9.0 +WORKDIR /app + +RUN mkdir -p /app/downloads + +COPY --from=build /app/publish . + +EXPOSE 8080 +ENV ASPNETCORE_URLS=http://+:8080 + +ENTRYPOINT ["dotnet", "octo-fiesta.dll"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4b9b771 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +services: + octo-fiesta: + build: . + container_name: octo-fiesta + restart: unless-stopped + ports: + - "5274:8080" + environment: + - ASPNETCORE_ENVIRONMENT=Production + # Navidrome/Subsonic server URL + - Subsonic__Url=${SUBSONIC_URL:-http://localhost:4533} + # Download path inside container + - Library__DownloadPath=/app/downloads + # Deezer ARL token (required) + - Deezer__Arl=${DEEZER_ARL} + # Fallback ARL token (optional) + - Deezer__ArlFallback=${DEEZER_ARL_FALLBACK:-} + volumes: + - ${DOWNLOAD_PATH:-./downloads}:/app/downloads