Allow options to be passed to the docker + document it (close #87)

This commit is contained in:
Petr Sloup 2016-12-21 07:01:16 +01:00
parent 0ec992eb21
commit d32e46ba2f
4 changed files with 8 additions and 3 deletions

View File

@ -27,4 +27,4 @@ VOLUME /data
WORKDIR /data
EXPOSE 80
CMD ["/usr/src/app/run.sh"]
ENTRYPOINT ["/usr/src/app/run.sh"]

View File

@ -9,4 +9,4 @@ VOLUME /data
WORKDIR /data
EXPOSE 80
CMD ["node", "/usr/src/app/", "-p", "80"]
ENTRYPOINT ["node", "/usr/src/app/", "-p", "80"]

View File

@ -9,6 +9,11 @@ When running docker image, no special installation is needed -- the docker will
Just run ``docker run -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl``.
Additional options (see :doc:`/usage`) can be passed to the TileServer GL by appending them to the end of this command. You can, for example, do the following:
* ``docker run ... klokantech/tileserver-gl my-tiles.mbtiles`` -- explicitly specify which mbtiles to use (if you have more in the folder)
* ``docker run ... klokantech/tileserver-gl --verbose`` -- to see the default config created automatically
npm
===

2
run.sh
View File

@ -1,3 +1,3 @@
#!/bin/bash
cd /data
xvfb-run -a -e /dev/stdout --server-args="-screen 0 1024x768x24" node /usr/src/app/ -p 80
xvfb-run -a -e /dev/stdout --server-args="-screen 0 1024x768x24" node /usr/src/app/ -p 80 "$@"