cteward-ng/Dockerfile

32 lines
900 B
Text
Raw Normal View History

2026-06-06 09:46:52 +02:00
FROM python:3.12-slim
RUN apt-get update && \
apt-get install -y \
curl \
gnupg \
ca-certificates \
unixodbc \
unixodbc-dev && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/share/keyrings && \
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | \
gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/debian/12/prod bookworm main" \
> /etc/apt/sources.list.d/microsoft-prod.list
RUN apt-get update && \
ACCEPT_EULA=Y apt-get install -y msodbcsql18
2026-06-06 12:04:59 +02:00
COPY cteward_ng/requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
2026-06-06 09:46:52 +02:00
WORKDIR /app
2026-06-06 12:04:59 +02:00
COPY cteward_ng/ ./
2026-06-06 09:46:52 +02:00
2026-06-06 12:04:59 +02:00
EXPOSE 5000
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--timeout", "120", "app:create_app()"]