Moves the six backend projects on disk into Core/ and Hosts/ subfolders, matching the solution folders already defined in Musify.slnx, so the file explorer reflects the same layout as the solution: backend/Core/Musify.Domain backend/Core/Musify.Application backend/Core/Musify.Infrastructure backend/Hosts/Musify.Api backend/Hosts/Musify.Worker backend/Hosts/Musify.StreamingGateway Updates every reference to the old paths: ProjectReference entries in Musify.Api.csproj and Musify.Worker.csproj, the three Dockerfiles, deploy/scripts/migrate.ps1|sh, deploy/zitadel/provision.ps1, deploy/up.ps1, deploy/README.md and docs/development.md. Also fixes a stale Dockerfile comment pointing at a compose file that no longer exists. Verified with `dotnet build Musify.slnx` against the new layout.
35 lines
1.8 KiB
Docker
35 lines
1.8 KiB
Docker
# Build context: backend/
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
WORKDIR /src
|
|
|
|
COPY Directory.Build.props Directory.Packages.props nuget.config ./
|
|
COPY Core/Musify.Domain/Musify.Domain.csproj Core/Musify.Domain/
|
|
COPY Core/Musify.Application/Musify.Application.csproj Core/Musify.Application/
|
|
COPY Core/Musify.Infrastructure/Musify.Infrastructure.csproj Core/Musify.Infrastructure/
|
|
COPY Hosts/Musify.Worker/Musify.Worker.csproj Hosts/Musify.Worker/
|
|
RUN dotnet restore Hosts/Musify.Worker/Musify.Worker.csproj
|
|
|
|
COPY . .
|
|
RUN dotnet publish Hosts/Musify.Worker/Musify.Worker.csproj -c Release -o /app --no-restore
|
|
# AppSettings*.json (PascalCase) -> lowercase copies for case-sensitive Linux.
|
|
RUN cp /app/AppSettings.json /app/appsettings.json \
|
|
&& cp /app/AppSettings.Development.json /app/appsettings.Development.json
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
|
|
WORKDIR /app
|
|
# ffmpeg: the Worker transcodes audio to .m4a. yt-dlp: downloads YouTube audio.
|
|
# yt-dlp is installed via pip in a venv rather than the standalone PyInstaller
|
|
# binary: the binary adds a ~1s unpack cost per invocation and extracts slower,
|
|
# so pip roughly halves resolution latency. deno solves nsig challenges.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ffmpeg python3 python3-venv ca-certificates curl unzip \
|
|
&& python3 -m venv /opt/ytdlp \
|
|
&& /opt/ytdlp/bin/pip install --no-cache-dir -U yt-dlp \
|
|
&& ln -s /opt/ytdlp/bin/yt-dlp /usr/local/bin/yt-dlp \
|
|
&& curl -fsSL https://deno.land/install.sh | sh -s -- -y \
|
|
&& mv /root/.deno/bin/deno /usr/local/bin/deno \
|
|
&& apt-get purge -y curl unzip \
|
|
&& rm -rf /var/lib/apt/lists/* /root/.deno
|
|
COPY --from=build /app ./
|
|
ENTRYPOINT ["dotnet", "Musify.Worker.dll"]
|