- Add standalone gitea_runner/app.yaml and docker-compose.yml without docker.sock mount - Add snappymail/app.yaml and docker-compose.yml with env-var injection - Add jellyfin/app.yaml and align jellyfin/docker-compose.yml media mount to ./media - Add armonia/app.yaml, docker-compose.yml, Dockerfile.dashboard, and nginx.conf
34 lines
971 B
Docker
34 lines
971 B
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=""
|
|
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
|