feat: add dockerfile, update sqlalchemy, fix template

This commit is contained in:
2026-01-11 20:42:58 +01:00
parent 95c8a5f066
commit 1b681ed101
7 changed files with 116 additions and 66 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Install curl for health check
RUN apt-get update && apt-get install -y curl libmagic1t64 && rm -rf /var/lib/apt/lists/*
COPY . .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Make port 80 available to the world outside this container
EXPOSE 80
# Add health check
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD curl http://localhost || exit 1
# Run the application using Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:80", "--workers", "4", "wsgi:app"]