CI / lint-and-test (push) Has been cancelled
- Remove multi-marketplace from Phase 3 - Add FastAPI web UI on port 8766 with basic auth - Add 6 Jinja2 templates (dashboard, keywords, users, ads, stats) - Add pytest test suite (45 tests, 49% coverage) - Add GitHub Actions CI/CD workflow - Update docker-compose.yml to expose web UI port - Update Dockerfile to include tests
22 lines
824 B
Docker
22 lines
824 B
Docker
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
|
|
# ── Dependencies ────────────────────────────────
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# ── Application code + migrations + tests + templates ──
|
|
COPY src/ .
|
|
COPY tests/ tests/
|
|
|
|
# Make entrypoint executable
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
# ── Healthcheck (Docker-native) ─────────────────
|
|
HEALTHCHECK --interval=15s --timeout=3s --retries=3 \
|
|
CMD python -c "import httpx,os; r=httpx.get(f'http://localhost:{os.getenv(\"HEALTH_PORT\",\"8765\")}/health'); r.raise_for_status()" || exit 1
|
|
|
|
# ── Entrypoint: migrate then run ────────────────
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
CMD ["python", "main.py"]
|