-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: Provide a job to scrape OSM boundaries - added dockerfile (#5)
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |