Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

841 B
Raw Blame
## Container with the Tegola tileserver binary and the expire.py script,
# which is used to invalidate tiles based on expiry files generated by Imposm.
FROM python:3.9-slim AS build
ARG TEGOLA_CONFIG=.

WORKDIR /app
COPY ./*.py ./
COPY ${TEGOLA_CONFIG}/layers.yml ${TEGOLA_CONFIG}/tegola.yml ./
RUN pip install PyYAML toml
RUN python generate_tegola_config.py ./tegola.yml ./layers.yml > ./config.toml

FROM gospatial/tegola:v0.20.0

ENV BOUNDS="-180,-85.0511,180,85.0511" \
    DB_URI=postgres://user:password@host:5432/database

COPY --from=build /app/config.toml /etc/tegola/config.toml

RUN apk update && \
    apk add python3 py3-pip && \
    rm -Rf /var/cache/apk/*

RUN pip3 install inotify==0.2.10 click==8.1.3 psycopg[binary]==3.2.5

WORKDIR /app
COPY expire.py .

ENTRYPOINT ["/usr/bin/python3", "/app/expire.py", "/imposm-expiry"]