FROM python:3.12-slim-bookworm

# osmium-tool = RAM-schonende tags-filter-Vorstufe (C++, streaming),
# pyosmium = Extraktion + Schwerpunktberechnung.
RUN apt-get update && apt-get install -y --no-install-recommends \
        osmium-tool curl ca-certificates \
    && rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir osmium

WORKDIR /app
COPY extract_osm_pois.py load_into_prod.py refresh.sh /app/
RUN chmod +x /app/refresh.sh

ENTRYPOINT ["/app/refresh.sh"]
