This commit is contained in:
2026-03-27 10:20:35 +01:00
parent b922a1ced0
commit fa9d7c7f43
48 changed files with 67256 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
FROM python:3.12-slim
LABEL maintainer="DragonBank Team"
LABEL description="DragonBank Interest Calculator Service"
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY app.py .
RUN adduser --disabled-password --gecos '' appuser && \
chown -R appuser:appuser /app
USER appuser
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD python -c "import psycopg2; psycopg2.connect('${DATABASE_URL}')" || exit 1
CMD ["python", "app.py"]