CI / test (push) Failing after 1m37s
- Dockerfile: copie du code avant installation (le package installé n'est plus vide — I6), utilisateur non-root, HEALTHCHECK - compose: version: obsolète retiré, variables d'auth, healthcheck - pyproject: version 0.2.0, jinja2 <4, config pytest - LICENSE (MIT), CHANGELOG 0.2.0, README réécrit (configuration, sécurité, API, tests), .dockerignore
29 lines
902 B
Docker
29 lines
902 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
KANBANTE_DB_PATH=/data/kanbante.db \
|
|
GITEA_URL=https://git.dracodev.net
|
|
|
|
# Copy the package BEFORE installing: with the 0.1.0 layout (install
|
|
# first, copy app/ afterwards) the installed distribution was empty and
|
|
# the app only worked by accident of the working directory.
|
|
COPY pyproject.toml ./
|
|
COPY app/ ./app/
|
|
COPY static/ ./static/
|
|
RUN pip install --no-cache-dir .
|
|
|
|
# Persistent data directory (volume target) + non-root runtime user
|
|
RUN mkdir -p /data \
|
|
&& adduser --disabled-password --gecos "" appuser \
|
|
&& chown -R appuser:appuser /data /app
|
|
USER appuser
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/api/health', timeout=4)"
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
|