Files
mealplanner/Dockerfile
Claude f58782774b 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>
2026-04-14 19:10:10 +00:00

34 lines
997 B
Docker

# 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"]