Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d5be67efc | ||
|
|
aba60f0c6a | ||
|
|
6027d89623 | ||
|
|
8680a8006a | ||
|
|
09ded526ef | ||
|
|
c89a5ae029 | ||
|
|
a3d7f8bcbd |
@@ -46,10 +46,10 @@ ENV CHOKIDAR_INTERVAL=500
|
|||||||
VOLUME /data
|
VOLUME /data
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 80
|
||||||
|
|
||||||
USER node:node
|
USER node:node
|
||||||
|
|
||||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["-p", "8000"]
|
CMD ["-p", "80"]
|
||||||
|
|||||||
@@ -10,6 +10,14 @@ handle() {
|
|||||||
|
|
||||||
trap handle INT TERM
|
trap handle INT TERM
|
||||||
|
|
||||||
|
refresh() {
|
||||||
|
SIGNAL=$(( $? - 128 ))
|
||||||
|
echo "Caught signal ${SIGNAL}, refreshing"
|
||||||
|
kill -s ${SIGNAL} $(pidof node) 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
trap refresh HUP
|
||||||
|
|
||||||
if ! which -- "${1}"; then
|
if ! which -- "${1}"; then
|
||||||
# first arg is not an executable
|
# first arg is not an executable
|
||||||
xvfb-run -a --server-args="-screen 0 1024x768x24" -- node /app/ "$@" &
|
xvfb-run -a --server-args="-screen 0 1024x768x24" -- node /app/ "$@" &
|
||||||
|
|||||||
@@ -29,8 +29,10 @@ Default preview style and configuration
|
|||||||
- If no configuration file is specified, a default preview style (compatible with openmaptiles) is used.
|
- If no configuration file is specified, a default preview style (compatible with openmaptiles) is used.
|
||||||
- If no mbtiles file is specified (and is not found in the current working directory), a sample file is downloaded (showing the Zurich area)
|
- If no mbtiles file is specified (and is not found in the current working directory), a sample file is downloaded (showing the Zurich area)
|
||||||
|
|
||||||
Reloading configuration
|
Reloading the configuration
|
||||||
======
|
======
|
||||||
|
|
||||||
It is possible to reload the configuration file without restarting the whole process by sending a SIGHUP signal to the node process.
|
It is possible to reload the configuration file without restarting the whole process by sending a SIGHUP signal to the node process.
|
||||||
However, this does not currently work when running the tileserver-gl docker container (the signal is not passed to the subprocess, see https://github.com/maptiler/tileserver-gl/issues/420#issuecomment-597507663).
|
|
||||||
|
- The `docker kill -s HUP tileserver-gl` command can be used when running the tileserver-gl docker container.
|
||||||
|
- The `docker-compose -s HUP tileserver-gl-service-name` can be used when tileserver-gl is run as a docker-compose service.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tileserver-gl",
|
"name": "tileserver-gl",
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"description": "Map tile server for JSON GL styles - vector and server side generated raster tiles",
|
"description": "Map tile server for JSON GL styles - vector and server side generated raster tiles",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"bin": "src/main.js",
|
"bin": "src/main.js",
|
||||||
|
|||||||
@@ -256,6 +256,17 @@ function start(opts) {
|
|||||||
res.send(result);
|
res.send(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.get('/process', (req, res, next) => {
|
||||||
|
const result = {};
|
||||||
|
const id = req.query.style || '';
|
||||||
|
const item = {
|
||||||
|
'style': id + '.json'
|
||||||
|
};
|
||||||
|
result[id] = true;
|
||||||
|
addStyle(id, item, true, true);
|
||||||
|
res.send(serving.styles);
|
||||||
|
});
|
||||||
|
|
||||||
const addTileJSONs = (arr, req, type) => {
|
const addTileJSONs = (arr, req, type) => {
|
||||||
for (const id of Object.keys(serving[type])) {
|
for (const id of Object.keys(serving[type])) {
|
||||||
const info = clone(serving[type][id].tileJSON);
|
const info = clone(serving[type][id].tileJSON);
|
||||||
|
|||||||
Reference in New Issue
Block a user