feat: complete mealplanner app (backend + frontend + deployment)
.NET 8 backend with Zitadel JWT auth, TheMealDB integration, weekly meal plan generation, shopping list aggregation. Vue 3 + Tailwind 4 frontend with dark emerald theme, manual OIDC PKCE auth, all views implemented. Multi-stage Dockerfile with nginx reverse proxy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
# Stage 1: Build frontend
|
||||
FROM oven/bun:1 AS frontend-build
|
||||
WORKDIR /app
|
||||
COPY frontend/package.json frontend/bun.lock* ./
|
||||
RUN bun install --frozen-lockfile || bun install
|
||||
COPY frontend/ .
|
||||
RUN bun run build
|
||||
|
||||
# Stage 2: Build backend
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS backend-build
|
||||
WORKDIR /src
|
||||
COPY backend/*.csproj .
|
||||
RUN dotnet restore
|
||||
COPY backend/ .
|
||||
RUN dotnet publish -c Release -o /app
|
||||
|
||||
# Stage 3: Runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
RUN apt-get update && apt-get install -y nginx curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=backend-build /app .
|
||||
COPY --from=frontend-build /app/dist /var/www/html
|
||||
|
||||
RUN rm /etc/nginx/sites-enabled/default
|
||||
COPY nginx.conf /etc/nginx/sites-enabled/default
|
||||
|
||||
RUN printf '#!/bin/bash\nnginx &\ncd /app && dotnet backend.dll\n' > /start.sh && chmod +x /start.sh
|
||||
|
||||
EXPOSE 80
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 --start-period=30s \
|
||||
CMD ["curl", "-f", "http://localhost:80/health"]
|
||||
CMD ["/bin/bash", "/start.sh"]
|
||||
Reference in New Issue
Block a user