From 9aacdb3b37fca21869d59d4fa79d1336b924dbcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ko=C4=87?= Date: Sun, 9 Jul 2017 16:07:31 +0200 Subject: [PATCH] Adding Kosmtik plugins to Docker --- Dockerfile | 15 ++++++++++++++- scripts/docker-startup.sh | 5 +---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b408cf610..6380d48349 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,10 +12,23 @@ RUN curl -sL https://deb.nodesource.com/setup_6.x | bash \ && apt-get install --no-install-recommends -y nodejs \ && rm -rf /var/lib/apt/lists/* +# Kosmtik with plugins RUN npm install -g kosmtik +WORKDIR /usr/lib/node_modules/kosmtik/ +RUN kosmtik plugins --install kosmtik-overpass-layer \ + --install kosmtik-fetch-remote \ + --install kosmtik-overlay \ + --install kosmtik-open-in-josm \ + --install kosmtik-map-compare \ + --install kosmtik-osm-data-overlay \ + --install kosmtik-mapnik-reference \ + --install kosmtik-geojson-overlay \ + && cp /root/.config/kosmtik.yml /tmp/.kosmtik-config.yml + +# Closing section RUN mkdir -p /openstreetmap-carto WORKDIR /openstreetmap-carto USER 1000 -CMD sh scripts/docker-startup.sh kosmtik \ No newline at end of file +CMD sh scripts/docker-startup.sh kosmtik diff --git a/scripts/docker-startup.sh b/scripts/docker-startup.sh index 5e24e1fbeb..8e025b6edf 100644 --- a/scripts/docker-startup.sh +++ b/scripts/docker-startup.sh @@ -32,11 +32,8 @@ import) kosmtik) python scripts/get-shapefiles.py -n - mkdir -p .config if [ ! -e ".kosmtik-config.yml" ]; then - touch .kosmtik-config.yml - # this can be removed once https://github.com/kosmtik/kosmtik/issues/236 is resolved - echo "plugins:" >> .kosmtik-config.yml + cp /tmp/.kosmtik-config.yml .kosmtik-config.yml fi export KOSMTIK_CONFIGPATH=".kosmtik-config.yml"