2026-06-15 17:08:05 +00:00
|
|
|
# fleettickets — INC ingestion image (Coolify-deployable).
|
|
|
|
|
# A small batch/cron worker: it has no web server. Coolify keeps the container
|
|
|
|
|
# running (CMD below) and fires the ingest via a Scheduled Task:
|
|
|
|
|
# python import_tickets.py --from-bucket --apply (cron: 15 7-19 * * *)
|
|
|
|
|
# Env (set in Coolify): DATABASE_URL, RUSTFS_*, GEOCODER_*. S3 is via boto3 — no
|
|
|
|
|
# aws CLI needed. psycopg2-binary ships its own libpq, so no build toolchain.
|
|
|
|
|
FROM python:3.12-slim
|
|
|
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
|
|
|
PIP_NO_CACHE_DIR=1 \
|
|
|
|
|
TZ=Africa/Nairobi
|
|
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
|
&& apt-get install -y --no-install-recommends tzdata \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-06-18 10:41:38 +00:00
|
|
|
# Install from pyproject.toml (single source of truth for deps — no manual mirror).
|
2026-06-15 17:08:05 +00:00
|
|
|
COPY . .
|
2026-06-18 10:41:38 +00:00
|
|
|
RUN pip install .
|
2026-06-15 17:08:05 +00:00
|
|
|
|
|
|
|
|
# Keep the container alive so Coolify Scheduled Tasks can exec into it.
|
|
|
|
|
CMD ["tail", "-f", "/dev/null"]
|