.NET 10 solution for Ping, a Discord style chat app: Domain, Application and Infrastructure projects plus the Api host. SignalR for chat and presence, LiveKit for call tokens, EF Core on Postgres, S3 compatible storage for attachments, and OIDC auth shared with the Musify Zitadel instance. Includes the Compose stack for local development.
25 lines
1.2 KiB
Docker
25 lines
1.2 KiB
Docker
# Build context: backend/ (docker compose -f deploy/compose.yml up migrate)
|
|
#
|
|
# Applies EF Core migrations, then exits. Ping.Infrastructure is both the migrations and the
|
|
# design-time startup project: it owns the IDesignTimeDbContextFactory and the EFCore.Design
|
|
# package. The connection string comes from the Database__ConnectionString env var (compose
|
|
# sets it), read via DatabaseDesignTimeFactory's AddEnvironmentVariables().
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0
|
|
WORKDIR /src
|
|
|
|
COPY Directory.Build.props Directory.Packages.props nuget.config ./
|
|
COPY Core/Ping.Domain/Ping.Domain.csproj Core/Ping.Domain/
|
|
COPY Core/Ping.Application/Ping.Application.csproj Core/Ping.Application/
|
|
COPY Core/Ping.Infrastructure/Ping.Infrastructure.csproj Core/Ping.Infrastructure/
|
|
RUN dotnet restore Core/Ping.Infrastructure/Ping.Infrastructure.csproj
|
|
|
|
COPY Core/Ping.Domain Core/Ping.Domain/
|
|
COPY Core/Ping.Application Core/Ping.Application/
|
|
COPY Core/Ping.Infrastructure Core/Ping.Infrastructure/
|
|
|
|
RUN dotnet tool install --global dotnet-ef --version 10.0.11
|
|
ENV PATH="$PATH:/root/.dotnet/tools"
|
|
|
|
WORKDIR /src/Core/Ping.Infrastructure
|
|
ENTRYPOINT ["dotnet", "ef", "database", "update", "--context", "Database"]
|