test / Dockerfile
akborana4's picture
Update Dockerfile
b515256 verified
raw
history blame
419 Bytes
# Use Node base image
FROM node:18-alpine
# Install a lightweight HTTP server
RUN npm install -g serve
# Create directories and copy files
WORKDIR /app
COPY server ./server
COPY app ./app
# Install backend dependencies
WORKDIR /app/server
RUN npm install
# Expose ports
EXPOSE 8080 7860
# Run both the backend server and the frontend serve command
CMD sh -c "node /app/server/server.js & serve -s /app/app -l 7860"