The production stage was running npm ci --omit=dev against a macOS- generated lockfile on linux/alpine, which caused exit code 1. Switch to installing only the three packages the server actually needs (express, cors, docx) so the lockfile is irrelevant in that stage. Also upgrades to node:22-alpine (current LTS) to clear the Node 20 deprecation warning on GitHub Actions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
300 B
Docker
18 lines
300 B
Docker
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:22-alpine
|
|
WORKDIR /app
|
|
RUN npm install express cors docx
|
|
COPY server.js ./
|
|
COPY --from=build /app/build ./build
|
|
|
|
ENV DATA_DIR=/data
|
|
VOLUME ["/data"]
|
|
EXPOSE 4000
|
|
CMD ["node", "server.js"]
|