Platform-v2 step 2.1 (APPS_PLATFORM D-15):
- root package.json with workspaces (packages/*, waiter_pwa, manager_dashboard)
and empty @xenia/{ui,i18n,api,access} skeletons (filled in 2.3-2.5)
- one root package-lock.json generated from the two old app locks, so every
dependency keeps its exact version (a fresh resolve moved the Capacitor and
Capgo native plugins and broke UI-bundle updates); apps keep nested trees
- waiter/manager Dockerfiles build with context client-services/ (npm ci per
workspace), root .dockerignore replaces the per-app ones; manager on node 22
- Vite dedupes react/react-dom so source-imported packages share the app's React
- waiter eslint ignores build outputs and the Android project
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.4 KiB
Docker
38 lines
1.4 KiB
Docker
# Build context: client-services/ (the npm workspace root, APPS_PLATFORM D-15)
|
|
# docker build -f waiter_pwa/Dockerfile .
|
|
FROM node:22-slim AS builder
|
|
|
|
# Shown in the UI bundle manifest (plan step 8); the bundle's identity is its content hash
|
|
ARG APP_VERSION=0.0.0
|
|
|
|
WORKDIR /app
|
|
|
|
# Manifests first so the install layer is cached until a dependency changes.
|
|
# The lockfile covers every workspace, so all their package.json files are needed.
|
|
COPY package.json package-lock.json ./
|
|
COPY packages/ui/package.json packages/ui/
|
|
COPY packages/i18n/package.json packages/i18n/
|
|
COPY packages/api/package.json packages/api/
|
|
COPY packages/access/package.json packages/access/
|
|
COPY waiter_pwa/package.json waiter_pwa/
|
|
COPY manager_dashboard/package.json manager_dashboard/
|
|
RUN npm ci --workspace waiter_pwa --include-workspace-root
|
|
|
|
COPY packages/ packages/
|
|
COPY waiter_pwa/ waiter_pwa/
|
|
|
|
WORKDIR /app/waiter_pwa
|
|
# Web build (served to browsers) + native UI bundle that phones download from
|
|
# this server: dist/downloads/waiter-bundle.json + waiter-bundle-<hash>.zip
|
|
RUN npm run build && npx vite build --mode native && APP_VERSION=$APP_VERSION node scripts/pack-bundle.mjs
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=builder /app/waiter_pwa/dist /usr/share/nginx/html
|
|
RUN chmod -R 755 /usr/share/nginx/html
|
|
COPY waiter_pwa/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|