Web2k / Dockerfile
Shinhati2023's picture
Update Dockerfile
cc71218 verified
raw
history blame contribute delete
575 Bytes
# Stage 1: Build React Client
FROM node:18-alpine as client-build
WORKDIR /app/client
COPY client/package*.json ./
RUN npm install
COPY client/ ./
# --- DEBUG STEP: Print all files to logs ---
RUN echo "=== FILE LISTING START ===" && ls -R && echo "=== FILE LISTING END ==="
RUN npm run build
# Stage 2: Production Server
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY server/ ./server/
# Move built client to server's public folder
COPY --from=client-build /app/client/dist ./public
ENV PORT=7860
EXPOSE 7860
CMD ["node", "server/index.js"]