Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +10 -5
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Use an official Python image as a base
|
| 2 |
-
FROM python:3.9
|
| 3 |
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
|
@@ -13,8 +13,13 @@ COPY requirements.txt .
|
|
| 13 |
# Install dependencies from requirements.txt
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
-
# Expose the port
|
| 17 |
-
EXPOSE
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Use an official Python image as a base
|
| 2 |
+
FROM python:3.9-slim
|
| 3 |
|
| 4 |
# Set the working directory
|
| 5 |
WORKDIR /app
|
|
|
|
| 13 |
# Install dependencies from requirements.txt
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
+
# Expose the port Flask will run on (Flask default is 5000)
|
| 17 |
+
EXPOSE 5000
|
| 18 |
|
| 19 |
+
# Set the environment variable for Flask
|
| 20 |
+
ENV FLASK_APP=app.py
|
| 21 |
+
ENV FLASK_RUN_HOST=0.0.0.0
|
| 22 |
+
ENV FLASK_RUN_PORT=5000
|
| 23 |
+
|
| 24 |
+
# Run the app using Gunicorn
|
| 25 |
+
CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"]
|