feat(deploy): consolidated dev stack with auto-provisioned Zitadel
Single docker-compose stack for local development (Postgres, Zitadel, RabbitMQ, SeaweedFS + bucket init, Jaeger) plus an optional overlay to run the .NET apps in Docker. up.ps1 orchestrates the full bootstrap: stack up, stream-ticket keys, EF Core migrations and Zitadel provisioning. - Zitadel is provisioned automatically (service-account PAT -> project + OIDC app with JWT access token); the generated ClientId is wired into Musify.Api user-secrets and .env. No manual console steps. - ZITADEL_EXTERNAL_DOMAIN=host.docker.internal so token validation works both with local apps and full-docker. - App Dockerfiles copy AppSettings*.json to lowercase so config loads on case-sensitive Linux; Worker image ships ffmpeg. - Scripts split by responsibility (common/stream-keys/migrate/provision); apps overlay de-duped via YAML anchors. - Remove the superseded standalone seaweedfs compose; point docs/development at the unified stack.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
**/bin/
|
||||
**/obj/
|
||||
**/.vs/
|
||||
**/.idea/
|
||||
.git/
|
||||
.github/
|
||||
.agents/
|
||||
.claude/
|
||||
**/DesignSettings.json
|
||||
*.user
|
||||
@@ -0,0 +1,25 @@
|
||||
# Build context: backend/ (docker compose -f deploy/docker-compose.apps.yml build)
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# Restore: copy central config + csproj files first to cache the layer.
|
||||
COPY Directory.Build.props Directory.Packages.props nuget.config ./
|
||||
COPY Musify.Domain/Musify.Domain.csproj Musify.Domain/
|
||||
COPY Musify.Application/Musify.Application.csproj Musify.Application/
|
||||
COPY Musify.Infrastructure/Musify.Infrastructure.csproj Musify.Infrastructure/
|
||||
COPY Musify.Api/Musify.Api.csproj Musify.Api/
|
||||
RUN dotnet restore Musify.Api/Musify.Api.csproj
|
||||
|
||||
COPY . .
|
||||
RUN dotnet publish Musify.Api/Musify.Api.csproj -c Release -o /app --no-restore
|
||||
# Config files are AppSettings*.json (PascalCase); on case-sensitive Linux the host
|
||||
# looks for appsettings*.json. Add lowercase copies so they get loaded.
|
||||
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
|
||||
COPY --from=build /app ./
|
||||
ENV ASPNETCORE_URLS=http://+:5111
|
||||
EXPOSE 5111
|
||||
ENTRYPOINT ["dotnet", "Musify.Api.dll"]
|
||||
@@ -0,0 +1,17 @@
|
||||
# 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 Musify.StreamingGateway/Musify.StreamingGateway.csproj Musify.StreamingGateway/
|
||||
RUN dotnet restore Musify.StreamingGateway/Musify.StreamingGateway.csproj
|
||||
|
||||
COPY . .
|
||||
RUN dotnet publish Musify.StreamingGateway/Musify.StreamingGateway.csproj -c Release -o /app --no-restore
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build /app ./
|
||||
ENV ASPNETCORE_URLS=http://+:8081
|
||||
EXPOSE 8081
|
||||
ENTRYPOINT ["dotnet", "Musify.StreamingGateway.dll"]
|
||||
@@ -0,0 +1,25 @@
|
||||
# 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 Musify.Domain/Musify.Domain.csproj Musify.Domain/
|
||||
COPY Musify.Application/Musify.Application.csproj Musify.Application/
|
||||
COPY Musify.Infrastructure/Musify.Infrastructure.csproj Musify.Infrastructure/
|
||||
COPY Musify.Worker/Musify.Worker.csproj Musify.Worker/
|
||||
RUN dotnet restore Musify.Worker/Musify.Worker.csproj
|
||||
|
||||
COPY . .
|
||||
RUN dotnet publish 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.
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=build /app ./
|
||||
ENTRYPOINT ["dotnet", "Musify.Worker.dll"]
|
||||
Reference in New Issue
Block a user