mast/Dockerfile
Anish Lakhwara 1c27dd249e feat: 0.0.1 nearly mvp
- deployed to fly using a Dockerfile 🤮
- submit button
- scroll wheel action
- only add works currently
2025-02-23 17:19:15 -08:00

33 lines
658 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Dockerfile
# Step 1: Use a Node.js image to build the app
FROM node:18 as builder
# Set working directory inside the container
WORKDIR /app
# Copy package.json and package-lock.json
COPY ./mast-react-vite/package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the apps source code
COPY ./mast-react-vite/ .
# Build the app
RUN npm run build
# Step 2: Use an Nginx image to serve the static files
FROM nginx:alpine
# Copy the build files from the builder stage to the Nginx web directory
COPY --from=builder /app/dist /usr/share/nginx/html
# Expose port 80
EXPOSE 80
# Start Nginx server
CMD ["nginx", "-g", "daemon off;"]