# Router-Service (knaster). Build-Kontext: Repo-Wurzel. FROM python:3.12-slim ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 WORKDIR /app COPY core/pyproject.toml core/pyproject.toml COPY core/src core/src RUN pip install "./core[postgres]" # Portable Konfiguration; standortspezifisches (sites/) kann per Volume überschrieben werden COPY config config COPY catalog catalog COPY skills skills COPY sites sites COPY ontology ontology ENV KNASTER_CONFIG_DIR=/app/config \ KNASTER_SKILLS_DIR=/app/skills \ KNASTER_SITE_DIR=/app/sites/knaster \ KNASTER_ONTOLOGY=/app/ontology/know.yaml \ KNASTER_DRY_RUN=true RUN useradd --system --uid 10001 knaster USER knaster EXPOSE 8080 HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8080/health', timeout=4).status==200 else 1)" CMD ["knaster", "serve", "--host", "0.0.0.0", "--port", "8080"]