- Dockerfile/compose: Flask-App + selenium/standalone-chrome (noVNC), Healthcheck - app.py: /healthz + eingebettete noVNC-Live-Ansicht (NOVNC_URL, lokal:7900 / Cluster:/novnc/) - Helm-Chart infra/k8s/base/ibo: App + Selenium-Sidecar, 2 Ports, Ingress (/ + /novnc via stripPrefix), SSO-Middlewares aus dem CD-Repo - Gitea-CI: version -> test -> build-push -> helm-validate -> deploy-dev (Write-back) - .gitignore/.dockerignore (Dev-Samples raus) - infra/RUNBOOK-ibo.md: Zitadel/DNS/Deploy/Prod-Promote Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
24 lines
796 B
Docker
24 lines
796 B
Docker
# Image fuer die Immo-Bot Web-App (Flask).
|
|
# Chrome selbst laeuft NICHT hier, sondern im selenium-Container / -Sidecar
|
|
# (SELENIUM_REMOTE_URL, siehe docker-compose.yml bzw. das Helm-Chart).
|
|
#
|
|
# Single-Process bewusst: die App haelt In-Memory-State + SSE-Streams und startet
|
|
# eigene Threads fuer parallel_workers -> KEIN gunicorn-Multi-Worker.
|
|
|
|
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 5000
|
|
|
|
# Container-/Compose-Healthcheck gegen den leichten /healthz-Endpoint.
|
|
HEALTHCHECK --interval=10s --timeout=3s --start-period=15s --retries=5 \
|
|
CMD python -c "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:5000/healthz',timeout=2).status==200 else 1)"
|
|
|
|
CMD ["python", "app.py"]
|