chore(build): frontends become one npm workspace; images build from client-services/
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>
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
node_modules
|
||||
dist
|
||||
.env
|
||||
@@ -1,17 +1,30 @@
|
||||
FROM node:20-slim AS builder
|
||||
# Build context: client-services/ (the npm workspace root, APPS_PLATFORM D-15)
|
||||
# docker build -f manager_dashboard/Dockerfile .
|
||||
FROM node:22-slim AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install
|
||||
# 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 manager-dashboard --include-workspace-root
|
||||
|
||||
COPY . .
|
||||
COPY packages/ packages/
|
||||
COPY manager_dashboard/ manager_dashboard/
|
||||
|
||||
WORKDIR /app/manager_dashboard
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=builder /app/manager_dashboard/dist /usr/share/nginx/html
|
||||
COPY manager_dashboard/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
Generated
-3564
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,11 @@ import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
// npm workspace (D-15): shared packages are imported from source, so make
|
||||
// sure every import of React resolves to this app's copy.
|
||||
resolve: {
|
||||
dedupe: ['react', 'react-dom'],
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 5174,
|
||||
|
||||
Reference in New Issue
Block a user