- deployed to fly using a Dockerfile 🤮
- submit button
- scroll wheel action
- only add works currently
33 lines
658 B
Docker
33 lines
658 B
Docker
# 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 app’s 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;"]
|