File size: 556 Bytes
500ab4d
 
e50c5ef
500ab4d
 
e50c5ef
500ab4d
 
e50c5ef
500ab4d
 
 
 
 
 
 
fb0f28f
e50c5ef
500ab4d
 
 
 
e50c5ef
500ab4d
a86a76f
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
# Use a lightweight Python base image
FROM python:3.11-slim

# Set working directory inside the container
WORKDIR /app

# Copy dependency list first (for Docker caching)
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy your Flask app code into the container
COPY . .

# Expose the port Flask will run on
EXPOSE 7860

# Environment variables to make Flask run properly
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_ENV=production

# Command to run your Flask app
CMD ["python", "app.py"]