# VPS collector + live API: positions, flights, weather, fuel, reference, AirLabs.
FROM python:3.12-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl \
&& rm -rf /var/lib/apt/lists/*
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=/usr/local/bin sh
WORKDIR /app
COPY pyproject.toml uv.lock ./
RUN uv sync --extra stream --no-install-project
COPY . .
RUN uv sync --extra stream
EXPOSE 8090
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD curl -fsS http://127.0.0.1:8090/health || exit 1
CMD ["uv", "run", "python", "-m", "services.collector"]