WarTracker / Dockerfile
skander101's picture
initial commit: vibes only, probably bloated
6512187
Raw
History Blame Contribute Delete
457 Bytes
# Stage 1: Build React client
FROM node:20-alpine AS client-build
WORKDIR /app/client
COPY client/package.json client/package-lock.json* ./
RUN npm install
COPY client/ ./
RUN npm run build
# Stage 2: Production server
FROM node:20-alpine
WORKDIR /app/server
COPY server/package.json server/package-lock.json* ./
RUN npm install --omit=dev
COPY server/ ./
COPY --from=client-build /app/client/dist /app/client/dist
EXPOSE 7860
CMD ["node", "index.js"]