CrimsonREwind's picture
Upload 28 files
86112bd verified
raw
history blame contribute delete
610 Bytes
# 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"]