Files
canopy-workloads/armonia/Dockerfile.dashboard
kiskaadee 9c81b121a5 fix(workloads): resolve PR #6 review findings CR-01, CR-02, and CR-03
- gitea_runner/docker-compose.yml: replace broken https://gitea.${DOMAIN} fallback with internal http://gitea:3000 (CR-01)

- jellyfin/docker-compose.yml: align Traefik router, middleware, and service label prefixes to ${CONTAINER_NAME:-jellyfin} (CR-02)

- armonia/Dockerfile.dashboard: pin pnpm via PNPM_VERSION=9.15.4 instead of floating pnpm@latest (CR-03)
2026-11-18 20:57:01 -05:00

37 lines
1.1 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
ARG PNPM_VERSION=9.15.4
RUN apk add --no-cache git && \
corepack enable && \
corepack prepare pnpm@${PNPM_VERSION} --activate
ARG DASHBOARD_REPO_URL=""
ARG DASHBOARD_REF=main
ARG VITE_API_BASE_URL=/api
ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}
WORKDIR /app
RUN test -n "${DASHBOARD_REPO_URL}" || { echo "ERROR: DASHBOARD_REPO_URL build arg is required" >&2; exit 1; } && \
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