geo-data / cesium-terrain-server

A basic server for serving up filesystem based tilesets representing Cesium.js terrain models
271 stars 111 forks source link

gziping tiles #7

Open lazydino opened 8 years ago

lazydino commented 8 years ago

Hi,

It looks like I need to modify the GO server to do gzip for my custom tiles. I'd like to deploy the terrain server as it is via docker container as pulled from docker hub at https://hub.docker.com/r/geodata/cesium-terrain-server/ Any one know what should I do with my nginx reverse proxy setup so I can serve gzip terrain tiles for the my upstream Cesium Terrain Server?

I have my CTS container running at port 8088

docker run -d --name CTS -p 8088:8000 -v $TILEPATH:/data/tilesets/terrain geodata/cesium-terrain-server

and create a little nginx config

server { listen [::]:80; listen 80; server_name myterrain.mydomain.net;

location / {

gzip on;
gzip_types    application/octect-stream;

proxy_pass  http://tiles;
proxy_http_version 1.1;

} }

upstream tiles { server 127.0.0.1:8088; }


It is not working, but if I put a gizp respond filter on the go source code like https://github.com/NYTimes/gziphandler , and run it outside of docker work. Can anyone help?