diff --git a/Dockerfile b/Dockerfile index f5f005e..4ed65a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:6-stretch +FROM node:6.15.1-stretch MAINTAINER Petr Sloup ENV NODE_ENV="production" @@ -21,6 +21,7 @@ RUN apt-get -qq update \ libprotobuf-dev \ libxxf86vm-dev \ xvfb \ + x11-utils \ && apt-get clean RUN mkdir -p /usr/src/app diff --git a/Dockerfile_light b/Dockerfile_light index b3926ee..2c3c575 100644 --- a/Dockerfile_light +++ b/Dockerfile_light @@ -1,4 +1,4 @@ -FROM node:6 +FROM node:6.15.1-stretch MAINTAINER Petr Sloup ENV NODE_ENV="production" diff --git a/Dockerfile_test b/Dockerfile_test new file mode 100644 index 0000000..baaa989 --- /dev/null +++ b/Dockerfile_test @@ -0,0 +1,35 @@ +# Run tests inside docker without requiring full installation of dependencies on local machine +# Simply run "docker build -f Dockerfile_test ." +# WARNING: sometimes it fails with a core dumped exception + +FROM node:6-stretch +MAINTAINER Petr Sloup + +RUN apt-get -qq update \ +&& DEBIAN_FRONTEND=noninteractive apt-get -y install \ + apt-transport-https \ + curl \ + unzip \ + build-essential \ + python \ + libcairo2-dev \ + libgles2-mesa-dev \ + libgbm-dev \ + libllvm3.9 \ + libprotobuf-dev \ + libxxf86vm-dev \ + xvfb \ +&& apt-get clean + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +RUN wget -O test_data.zip https://github.com/klokantech/tileserver-gl/releases/download/v1.3.0/test_data.zip +RUN unzip -q test_data.zip -d test_data + +ENV NODE_ENV="test" + +COPY package.json . +RUN npm install +COPY / . +RUN xvfb-run --server-args="-screen 0 1024x768x24" npm test diff --git a/package.json b/package.json index 21d3837..8fb77c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tileserver-gl", - "version": "2.4.0", + "version": "2.5.0", "description": "Map tile server for JSON GL styles - vector and server side generated raster tiles", "main": "src/main.js", "bin": "src/main.js", @@ -19,17 +19,17 @@ "test": "mocha test/**.js --timeout 10000" }, "dependencies": { - "@mapbox/mapbox-gl-native": "3.5.4", + "@mapbox/mapbox-gl-native": "4.0.0", "@mapbox/mbtiles": "0.10.0", "@mapbox/sphericalmercator": "1.1.0", "@mapbox/vector-tile": "1.3.1", "advanced-pool": "0.3.3", - "canvas": "1.6.12", + "canvas": "1.6.13", "clone": "2.1.2", - "color": "3.0.0", - "commander": "2.18.0", - "cors": "2.8.4", - "express": "4.16.3", + "color": "3.1.0", + "commander": "2.19.0", + "cors": "2.8.5", + "express": "4.16.4", "glyph-pbf-composite": "0.0.2", "handlebars": "4.0.12", "http-shutdown": "^1.2.0", @@ -37,7 +37,7 @@ "pbf": "3.1.0", "proj4": "2.5.0", "request": "2.88.0", - "sharp": "0.20.8", + "sharp": "0.21.1", "tileserver-gl-styles": "1.2.0" }, "devDependencies": { diff --git a/public/resources/index.css b/public/resources/index.css index 6438b2e..8b5feb7 100644 --- a/public/resources/index.css +++ b/public/resources/index.css @@ -28,7 +28,7 @@ a{ color: #499DCE; transition: color .2s; } -a:hover{ +a:hover { color: #395D73; } .title { @@ -47,7 +47,7 @@ a:hover{ color: #499DCE; font-size:.8em; } -section{ +section { margin: 15px auto; width: 930px; padding: 30px 0; @@ -70,7 +70,7 @@ section{ font-size:20px; background:#fff; } -.item{ +.item { background:#fff; height: 191px; border: 1px solid #ededed; @@ -79,7 +79,7 @@ section{ .item:nth-child(odd) { background-color:#fbfbfb; } -.item img{ +.item img { position: absolute; margin: 30px; width: 128px; @@ -122,10 +122,10 @@ section{ text-decoration: none; font-weight: bold; } -.btn:first-child:hover{ +.btn:first-child:hover { background: #395D73; } -footer{ +footer { width:100%; border-top:1px solid #ededed; text-align:center; @@ -133,7 +133,7 @@ footer{ padding-top:10px; font-size:12px; } -footer img{ +footer img { width: 118px; height: 32px; } @@ -147,6 +147,10 @@ footer a { color: #787878; text-decoration: none; } +.details h3, .identifier { + max-width: 550px; + word-break: break-all; +} /* body background image */ body { @@ -185,31 +189,31 @@ body { .title.light:after { font-size:.6em; } - .title img{ + .title img { width: 200px; } - .subtitle{ + .subtitle { font-size: 20px; margin: 0 0 35px 0; } - .item{ + .item { height: 245px; } - .viewers{ + .viewers { float: left; text-align: left; width: 100%; margin-left: 30px; margin-top: 15px; } - .viewers a{ + .viewers a { display: inline-block; vertical-align: middle; } - .btn{ + .btn { margin: 0 20px 0 0; } - .btn:first-child{ + .btn:first-child { padding: 0 20px; } } diff --git a/public/templates/data.tmpl b/public/templates/data.tmpl index 3d05522..a95388e 100644 --- a/public/templates/data.tmpl +++ b/public/templates/data.tmpl @@ -5,10 +5,10 @@ {{name}} - TileServer GL {{#is_vector}} - - - - + + + + {{/is_vector}} {{^is_vector}} - - - + + +