Skip to content

Commit

Permalink
wip: Provide a job to scrape OSM boundaries - added dockerfile (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Dec 20, 2023
1 parent e609544 commit 35aaf52
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions dockerfile.osm-boundaries
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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 <[email protected]>"

# Default environment variables
ENV CRON="0 0 4 1 * *"

USER root

# Install wget, 7z, mapshaper
RUN apt-get update && apt-get -y install wget p7zip-full
RUN npm install -g mapshaper

USER node

# Copy the job and install the dependencies
COPY --chown=node:node jobfile-osm-boundaries.js geoservices.sh package.json yarn.lock /opt/job/
WORKDIR /opt/job
RUN chmod +x geoservices.sh
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

0 comments on commit 35aaf52

Please sign in to comment.