This commit is contained in:
Alex Holliday committed 2025-09-01 10:28:41 -07:00
1 parent 619c5242db
commit 0ca00ca6a1
1 file changed
+17 -7
+17 -7
View File
@@ -1,22 +1,32 @@
FROM node:24-slim AS frontend-build # ---------------------
# Frontend build stage
# ---------------------
FROM --platform=$BUILDPLATFORM node:24-slim AS frontend-build
WORKDIR /app/client WORKDIR /app/client
COPY client/package.json ./ COPY client/package*.json ./
RUN npm install
RUN npm ci
COPY client ./ COPY client ./
RUN npm rebuild esbuild
RUN npm run build RUN npm run build
# ---------------------
FROM node:24-slim AS backend # Backend stage
# ---------------------
FROM --platform=$BUILDPLATFORM node:24-slim AS backend
WORKDIR /app/server WORKDIR /app/server
COPY server/package.json ./ COPY server/package*.json ./
RUN npm install RUN npm ci
COPY server ./ COPY server ./
COPY --from=frontend-build /app/client/dist ./public COPY --from=frontend-build /app/client/dist ./public
RUN chmod +x ./scripts/inject-vars.sh RUN chmod +x ./scripts/inject-vars.sh