Recreated solution with web app template. Improved theme. Switched to ShadcnBlazor library

This commit is contained in:
2025-12-25 19:16:53 +01:00
parent 0cc35300f1
commit a2d4edc0e5
272 changed files with 2441 additions and 14449 deletions

View File

@@ -0,0 +1,63 @@
# Base image
FROM cgr.dev/chainguard/aspnet-runtime:latest AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
# Build dependencies
RUN apt-get update; apt-get install nodejs npm -y; apt-get clean
# Build options
ARG BUILD_CONFIGURATION=Release
# Download npm packages
WORKDIR /src/Moonlight.Frontend/Styles
COPY ["Moonlight.Frontend/Styles/package.json", "package.json"]
RUN npm install
# Restore nuget packages
WORKDIR /src
COPY ["Moonlight.Api/Moonlight.Api.csproj", "Moonlight.Api/"]
COPY ["Moonlight.Frontend/Moonlight.Frontend.csproj", "Moonlight.Frontend/"]
COPY ["Moonlight.Shared/Moonlight.Shared.csproj", "Moonlight.Shared/"]
RUN dotnet restore "Moonlight.Api/Moonlight.Api.csproj"
RUN dotnet restore "Moonlight.Frontend/Moonlight.Frontend.csproj"
# Copy over the whole sources
COPY . .
# Build styles
WORKDIR /src/Moonlight.Frontend/Styles
RUN npm run tailwind-build
# Build projects
WORKDIR "/src/Moonlight.Api"
RUN dotnet build "./Moonlight.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build-api
WORKDIR "/src/Moonlight.Frontend"
RUN dotnet build "./Moonlight.Frontend.csproj" -c $BUILD_CONFIGURATION -o /app/build-frontend
FROM build AS publish
# Publish options
ARG BUILD_CONFIGURATION=Release
# Publish applications
WORKDIR "/src/Moonlight.Api"
RUN dotnet publish "./Moonlight.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish-api /p:UseAppHost=false
WORKDIR "/src/Moonlight.Frontend"
RUN dotnet publish "./Moonlight.Frontend.csproj" -c $BUILD_CONFIGURATION -o /app/publish-frontend /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish-api .
COPY --from=publish /app/publish-frontend/wwwroot ./wwwroot
ENTRYPOINT ["dotnet", "Moonlight.Api.dll"]