- compose.cloud.yml: pagepiper-cloud project on port 8533 (avoids conflict with Linnet dev on 8521/Magpie on 8531) - docker/web/nginx.cloud.conf: handles both /pagepiper/* path (primary domain, no Caddy strip) and / path (menagerie, Caddy strips prefix) - docker/web/Dockerfile: NGINX_CONF build arg to select dev vs cloud conf - .env.cloud.example: cloud env template with BYOK gate vars - manage.sh: cloud:start|stop|restart|status|logs|build commands Caddy config updated separately (not in this repo). DNS record needed: pagepiper.circuitforge.tech → Heimdall edge IP.
20 lines
452 B
Docker
20 lines
452 B
Docker
# Stage 1: build Vue SPA
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY web/package*.json ./
|
|
RUN npm ci --prefer-offline
|
|
COPY web/ ./
|
|
|
|
ARG VITE_BASE_URL=/
|
|
ARG VITE_API_BASE=
|
|
ENV VITE_BASE_URL=$VITE_BASE_URL
|
|
ENV VITE_API_BASE=$VITE_API_BASE
|
|
|
|
RUN npm run build
|
|
|
|
# Stage 2: serve via nginx
|
|
FROM nginx:alpine
|
|
ARG NGINX_CONF=docker/web/nginx.conf
|
|
COPY ${NGINX_CONF} /etc/nginx/conf.d/default.conf
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
EXPOSE 80
|