salvage: uncommitted work from /home/jwoltje/distrobox-homes/mosaic-dev/src/stack-p5a (disk cleanup #824, 2026-11-06)
This commit is contained in:
1 parent
216cd72226
commit
c0500a9b9b
47 files changed
+6359
-80
No files matched your search
@@ -1,3 +1,8 @@
|
||||
# One build argument selects both the bundle payload and the runtime mode. P6
|
||||
# enables the Web UI by changing this default to "required"; the matching stage
|
||||
# builds the Vite artifact and the runner then fails startup if it is invalid.
|
||||
ARG GATEWAY_WEB_UI_MODE=disabled
|
||||
|
||||
FROM node:22-alpine AS base
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
@@ -20,9 +25,22 @@ RUN pnpm turbo run build --filter @mosaicstack/gateway...
|
||||
# --legacy is required for pnpm v10 when inject-workspace-packages is not set
|
||||
RUN pnpm --filter @mosaicstack/gateway --prod deploy --legacy /deploy
|
||||
|
||||
FROM builder AS web-ui-disabled
|
||||
RUN mkdir -p /web-ui
|
||||
|
||||
FROM builder AS web-ui-required
|
||||
RUN pnpm install --frozen-lockfile \
|
||||
&& pnpm --filter @mosaicstack/web build:vite \
|
||||
&& mkdir -p /web-ui \
|
||||
&& cp -R /app/apps/web/dist/. /web-ui/
|
||||
|
||||
FROM web-ui-${GATEWAY_WEB_UI_MODE} AS web-ui
|
||||
|
||||
FROM base AS runner
|
||||
ARG GATEWAY_WEB_UI_MODE
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ENV GATEWAY_WEB_UI_MODE=${GATEWAY_WEB_UI_MODE}
|
||||
# WorkspaceService shells out to git at runtime and roots workspaces at
|
||||
# $MOSAIC_ROOT/.workspaces (apps/gateway/src/workspace/workspace.service.ts);
|
||||
# mount a volume over /opt/mosaic to persist workspaces across container restarts.
|
||||
@@ -38,6 +56,8 @@ COPY --chown=node:node --from=builder /deploy/package.json ./package.json
|
||||
# dist is declared in package.json "files" so pnpm deploy copies it into /deploy;
|
||||
# copy from builder explicitly as belt-and-suspenders
|
||||
COPY --chown=node:node --from=builder /app/apps/gateway/dist ./dist
|
||||
# resolveWebDistPath() maps runner /app/dist/web-ui.js to /web/dist.
|
||||
COPY --chown=node:node --from=web-ui /web-ui /web/dist
|
||||
# gateway defaults to port 14242 (apps/gateway/src/main.ts)
|
||||
EXPOSE 14242
|
||||
USER node
|
||||
|
||||
Reference in new issue
Block a user