Spaces:
Runtime error
Runtime error
File size: 456 Bytes
dac4b5e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Use Node.js 20 as the base image
FROM node:20-slim
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json (if exists)
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# Build the frontend
RUN npm run build
# Expose the port the app runs on
EXPOSE 3000
# Set environment variable to production
ENV NODE_ENV=production
# Start the server
CMD ["npm", "start"]
|