File size: 610 Bytes
86112bd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use the official Python image from Docker Hub as the base image
FROM python:3.12-slim

# Set the working directory inside the container
WORKDIR /app

# Copy all the contents from your local project directory to the container
COPY . /app

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

# Expose the port Flask will run on (default: 5000)
EXPOSE 7860

# Set environment variable to load secrets from .env file
ENV FLASK_APP=main.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_RUN_PORT=7860
ENV FLASK_ENV=development

# Run the Flask app
CMD ["flask", "run"]