familynido/deploy/web.Dockerfile
Pablo Fernández a308041d59 Initial commit
FamilyNido — a self-hosted PWA for a single household: shared calendar,
chores, meals, school agenda, health records and a family wall. One
instance per family, deployable with `docker compose` on any home
server.

Stack: .NET 10 (ASP.NET Core Minimal APIs) + EF Core 10 + PostgreSQL 16
on the backend, Angular 21 (standalone, signals, zoneless) + Tailwind
CSS v4 on the frontend, SignalR for realtime, optional OIDC alongside
local credentials, integration via a versioned `/api/v1/**` public API.

See README.md for the module overview and how to deploy.
2026-05-13 00:23:14 +02:00

32 lines
1.3 KiB
Docker

# syntax=docker/dockerfile:1.7
# FamilyNido frontend — Angular 21 PWA served by nginx.
# Multi-stage: build bundle with Node, then ship static files on nginx:alpine.
ARG NODE_VERSION=22
ARG NGINX_VERSION=1.27
# ─── Build stage ────────────────────────────────────────────────────────────
FROM node:${NODE_VERSION}-alpine AS build
WORKDIR /src
COPY web/familynido-web/package.json web/familynido-web/package-lock.json ./
RUN npm ci --no-audit --no-fund
COPY web/familynido-web/ ./
RUN npx ng build --configuration production
# ─── Runtime stage ──────────────────────────────────────────────────────────
FROM nginx:${NGINX_VERSION}-alpine AS runtime
# Non-root nginx worker.
RUN rm -rf /usr/share/nginx/html/* /etc/nginx/conf.d/default.conf
COPY deploy/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /src/dist/familynido-web/browser/ /usr/share/nginx/html/
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD wget -qO- http://localhost:8080/healthz || exit 1
CMD ["nginx", "-g", "daemon off;"]