diff --git a/Dockerfile b/Dockerfile index a74b7f8..510e1ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ # Start from ubuntu FROM node:20 AS tippecanoe-builder +ENV TIPPECANOE_VERSION=2.24.0 + RUN apt-get update \ && apt-get -y upgrade \ && apt-get -y install \ @@ -9,7 +11,7 @@ RUN apt-get update \ zlib1g-dev \ git -RUN git clone https://github.com/felt/tippecanoe.git +RUN git clone https://github.com/felt/tippecanoe.git -b $TIPPECANOE_VERSION WORKDIR tippecanoe RUN make diff --git a/docker-compose.yml b/docker-compose.yml index 4f261f2..5afc004 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: nodejs: - image: watergis/vt:v0.0.1 + # image: ghcr.io/watergis/vt-boilerplate:v1.2.1 build: . environment: - db_user=$db_user diff --git a/src/postgis2mbtiles.js b/src/postgis2mbtiles.js index 349883f..52239cf 100644 --- a/src/postgis2mbtiles.js +++ b/src/postgis2mbtiles.js @@ -18,6 +18,9 @@ class postgis2mbtiles { if (fs.existsSync(mbtiles)) { fs.unlinkSync(mbtiles); } + + execSync(`tippecanoe -v`); + const cmd = ` tippecanoe \ --no-feature-limit \ @@ -32,7 +35,9 @@ class postgis2mbtiles { --attribution="${this.config.attribution}" \ -o ${mbtiles} ${geojsonfiles.join(' ')}`; - execSync(cmd).toString(); + console.log(cmd) + + execSync(cmd); geojsonfiles.forEach((f) => { fs.unlinkSync(f);