-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile.osm-boundaries
43 lines (35 loc) · 1.29 KB
/
dockerfile.osm-boundaries
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ARG KRAWLER_TAG
#
# Make a Krawler image alias to be able to take into account the KRAWLER_TAG argument
#
FROM kalisio/krawler:${KRAWLER_TAG} AS krawler
LABEL maintainer="Kalisio <contact@kalisio.xyz>"
# Default environment variables
ENV CRON="0 0 4 1 * *"
USER root
# Install osmium
RUN apt-get update && apt-get -y install libprotozero-dev rapidjson-dev libboost-program-options-dev libbz2-dev zlib1g-dev liblz4-dev libexpat1-dev cmake build-essential pandoc git
WORKDIR /opt
RUN git clone https://github.com/osmcode/libosmium
WORKDIR /opt/libosmium/build
RUN cmake .. && make && make install
WORKDIR /opt
RUN git clone https://github.com/osmcode/osmium-tool.git
WORKDIR /opt/osmium-tool/build
RUN cmake .. && make && make install
# Install mapshaper
RUN npm install -g mapshaper
# Install tippecanoe
RUN git clone https://github.com/felt/tippecanoe.git
RUN cd tippecanoe
RUN make -j
RUN make install
USER node
# Copy the job and install the dependencies
COPY --chown=node:node jobfile-osm-boundaries.js package.json yarn.lock /opt/job/
WORKDIR /opt/job
RUN yarn && yarn link @kalisio/krawler && yarn cache clean
# Add default healthcheck
HEALTHCHECK --interval=1m --timeout=10s --start-period=1m CMD node /opt/krawler/healthcheck.js
# Run the job
CMD krawler --cron "$CRON" --run jobfile-osm-boundaries.js