-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
60 lines (39 loc) · 1.48 KB
/
Dockerfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# # Use an official Python runtime as the base image
# FROM python:3.11
# # Set the working directory in the container
# WORKDIR /app
# COPY build ./build
# COPY app.py /app/app.py
# # Copy the requirements file to the working directory
# COPY requirements.txt .
# # Install the Python dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # # Copy the application code to the working directory
# COPY . .
# # Expose the port on which the Flask app will run
# EXPOSE 8080
# ENV DOCKER_DEFAULT_PLATFORM=linux/amd64
# ENV api_key = "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"
# # Set the entry point command to run thxwx Flask app
# CMD ["python", "app.py"]
# # CMD ["gunicorn" , "-b", "0.0.0.0:8888", "app:app"]
# Use an official Python runtime as the base image
FROM python:3.11
# Set the working directory in the container
WORKDIR /app
# Copy the built React app to the working directory
COPY build ./build
# Copy the Flask app to the working directory
COPY app.py /app/app.py
# Copy the requirements file to the working directory
COPY requirements.txt .
# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code to the working directory
COPY . .
# Expose the port on which the Flask app will run
EXPOSE 8080
# Set the environment variable for the API key
# ENV api_key="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"
# Set the entry point command to run the Flask app
CMD ["python", "app.py"]