CodeRED-Astra/web-app/Dockerfile
2025-10-18 15:26:44 -05:00

22 lines
No EOL
405 B
Docker

# web-app/Dockerfile
FROM node:20-alpine
WORKDIR /app
# Copy package files first to leverage Docker's build cache
COPY package*.json ./
# Install dependencies
RUN npm ci --only=production=false
# Copy the rest of your application code
COPY . .
# Build the React application
RUN npm run build
# Expose the port
EXPOSE 3000
# Use preview mode for production-like serving
CMD ["npm", "run", "preview"]