profile / Dockerfile
n0w0f's picture
Replace FastAPI with React portfolio
c990683
raw
history blame contribute delete
382 Bytes
FROM node:18
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of the code
COPY . .
# Build the React app
RUN npm run build
# Install a simple server to serve the static files
RUN npm install -g serve
# Expose the port
EXPOSE 7860
# Start the server
CMD ["serve", "-s", "build", "-l", "7860"]