Add Docker configuration files and update requirements

This commit is contained in:
2025-05-22 19:28:42 +02:00
parent 589b082190
commit a53d5b91fb
3 changed files with 26 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
# Use an official Python runtime as a parent image
FROM python:3.11-slim
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
@@ -9,18 +9,18 @@ ENV PYTHONUNBUFFERED 1
WORKDIR /app
# Install dependencies
COPY requirements.txt /app/
RUN pip install --upgrade pip && pip install -r requirements.txt
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . /app/
COPY . .
# Expose the port Flask runs on
EXPOSE 5000
# Set environment variable for Flask
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_ENV=production
# Run the application
CMD ["flask", "run"]
CMD ["flask", "run", "--host=0.0.0.0"]