-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 708 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 708 Bytes
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
28
29
# Use the official Node.js 14 image as the base image
FROM node:14
# Set the working directory inside the container
WORKDIR /app
# Copy the package.json and package-lock.json files to the container
COPY frontend/package.json .
COPY frontend/package-lock.json .
# Install dependencies
RUN npm install
# Copy the rest of the frontend code
COPY frontend .
# Build the React app for production
RUN npm run build
# Install Flask and other Python dependencies
RUN apt-get update && apt-get install -y python3 python3-pip
COPY backend/requirements.txt .
RUN pip3 install -r requirements.txt
# Expose the desired port
EXPOSE 3000
# Set the command to run the backend server
CMD ["python3", "backend/app.py"]