- Add Schema v1.0 app.yaml manifest for armonia.roadtotech.me - Add multistage Dockerfile.dashboard (Node 22 pnpm -> Nginx 1.27 Alpine) and nginx.conf with /api/ proxy and Authelia header forwarding - Configure docker-compose.yml with Traefik public/protected routers, /api prefix stripping, and SQLite volume persistance - Document environment variables and Turso driver normalization tracking (armonia-api#11) Refs: armonia-del-ser/.profile#2
34 lines
1.0 KiB
Docker
34 lines
1.0 KiB
Docker
# syntax=docker/dockerfile:1
|
|
# Multi-stage production container build for armonia-dashboard (Vite SPA -> Nginx Alpine)
|
|
|
|
# Stage 1: Clone and build static SPA bundle from upstream Gitea repository
|
|
FROM node:22-alpine AS builder
|
|
|
|
RUN apk add --no-cache git && \
|
|
corepack enable && \
|
|
corepack prepare pnpm@latest --activate
|
|
|
|
ARG DASHBOARD_REPO_URL=https://gitea.roadtotech.me/armonia-del-ser/armonia-dashboard.git
|
|
ARG DASHBOARD_REF=main
|
|
ARG VITE_API_BASE_URL=/api
|
|
|
|
ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
|
|
|
|
WORKDIR /app
|
|
|
|
RUN git clone --depth 1 --branch "${DASHBOARD_REF}" "${DASHBOARD_REPO_URL}" . && \
|
|
pnpm install --frozen-lockfile && \
|
|
pnpm run build
|
|
|
|
|
|
# Stage 2: Lightweight Nginx Alpine runtime serving static assets and proxying /api
|
|
FROM nginx:1.27-alpine AS runtime
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD wget -q -O /dev/null http://127.0.0.1:80/ || exit 1
|