Files
Ping/backend/Ping.Api.Dockerfile
T
Admin 0623875dfa Add Ping backend
.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.
2026-09-21 19:32:55 +02:00

22 lines
919 B
Docker

# Build context: backend/ (docker compose -f deploy/compose.yml --profile apps 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 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/
COPY Hosts/Ping.Api/Ping.Api.csproj Hosts/Ping.Api/
RUN dotnet restore Hosts/Ping.Api/Ping.Api.csproj
COPY . .
RUN dotnet publish Hosts/Ping.Api/Ping.Api.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://+:5211
EXPOSE 5211
ENTRYPOINT ["dotnet", "Ping.Api.dll"]