feat: Convert website from static HTML to .NET 9.0 Blazor Web App
Major architectural upgrade from static HTML site to modern Blazor Web App: - Migrated to .NET 9.0 Blazor Web App framework - Converted home page with 4 gateway cards (Help Desk, App Store, Cloud, SDK) - Added new SDK card linking to comprehensive SDK documentation - Converted SDK documentation page to Blazor component - Updated template download links to nuget.silverlabs.uk repository - Implemented multi-stage Docker build with .NET SDK 9.0 - Created Blazor-optimized nginx configuration - Preserved all original styling and animations - Added .gitignore for Blazor build artifacts Technical changes: - New BlazorApp/ project structure with Components architecture - MainLayout simplified (no default navigation) - CSS ported to wwwroot (styles.css + sdk-styles.css) - Multi-stage Dockerfile: Build with dotnet SDK, serve with nginx - GitLab CI/CD pipeline compatible (auto-detects new Dockerfile) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
Dockerfile
28
Dockerfile
@@ -1,16 +1,26 @@
|
||||
# Build stage
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# Copy project file and restore dependencies
|
||||
COPY BlazorApp/SilverLabs.Website.csproj BlazorApp/
|
||||
RUN dotnet restore "BlazorApp/SilverLabs.Website.csproj"
|
||||
|
||||
# Copy all source files
|
||||
COPY BlazorApp/ BlazorApp/
|
||||
|
||||
# Build and publish the application
|
||||
WORKDIR /src/BlazorApp
|
||||
RUN dotnet publish "SilverLabs.Website.csproj" -c Release -o /app/publish
|
||||
|
||||
# Runtime stage
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy website files to nginx html directory
|
||||
COPY index.html /usr/share/nginx/html/
|
||||
COPY styles.css /usr/share/nginx/html/
|
||||
COPY script.js /usr/share/nginx/html/
|
||||
COPY logo.png /usr/share/nginx/html/
|
||||
|
||||
# Copy SDK directory with templates
|
||||
COPY sdk/ /usr/share/nginx/html/sdk/
|
||||
# Copy the published Blazor app to nginx html directory
|
||||
COPY --from=build /app/publish/wwwroot /usr/share/nginx/html
|
||||
|
||||
# Copy custom nginx configuration
|
||||
COPY nginx-site.conf /etc/nginx/conf.d/default.conf
|
||||
COPY nginx-blazor.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
Reference in New Issue
Block a user