-
Notifications
You must be signed in to change notification settings - Fork 647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimal maplibre-gl-native changes + docker build update #602
Conversation
Thanks, @acalcutt for the upgrades and for pushing this forward. I gave the fork a spin,
I'm using my usual tileserver-gl usage steps. Maybe I'm missing a step?!? # 1. edit, but don't commit, simple changes to `package.json` to expose version of your local build
# 2. Make a local Docker image
docker build -t tileserver-gl .
# 3. Use that local Docker image
# `zurich_switzerland.mbtiles` already in root folder
docker run --rm -it -v $(pwd):/data -p 8080:80 tileserver-gl --verbose
#
open http://localhost:8080 Docker logServer appears to be running fine. changed the
|
Maybe download the mbtiles first. I seem to remember in the docker it wasn't able to download to the current directory wget https://github.com/acalcutt/tileserver-gl/releases/download/test_data/zurich_switzerland.mbtiles |
In https://github.com/acalcutt/tileserver-gl/ I actually had made that part of the directions for docker. If running it straight with node the download works, but in the docker I don't think it wasn't able to write back to the data directory to save the file. Example using a mbtiles file
Example using a config.json + style + mbtiles file
|
Oh, actually I think it is the port it is coming up on. it is starting on 8080 but the command is saying it is on 80 try The missing mbtiles file would give an error like this, and you arn;t seeing that
|
I added "-p 80" to docker-entrypoint.sh so it starts on 80 inside docker like the old release did. I think now it should work with the instuctions you have and site documentation. Not sure how it used to start on port 80, since it looks like tileserver defaults to 8080 and there wasn't a port set in docker-entrypoint.sh before. EDIT: I see it was set here. |
@acalcutt — Thanks for the pointing out the port and the patch. I was successful using your steps. It now works from both your Docker Hub image & a locally built Docker image. Thanks! # Tested with Docker Hub image `wifidb/tileserver-gl`
# note: this will change when maptiler accepts the PR
docker run --rm -it -v $(pwd):/data -p 8080:80 wifidb/tileserver-gl
# Make a local Docker image
docker build -t tileserver-gl .
# Tested with locally built Docker image `tileserver-gl`
docker run --rm -it -v $(pwd):/data -p 8080:80 tileserver-gl --verbose
Test on |
Thanks for the effort ! Tested locally and everything seems to be working fine now, so I'm merging this PR 👍 I was also thinking about the Dockerfile, which got a little too complicated over time.. Maybe it would make sense to base it on |
I did explorer a few different docker images other than one I chose, but I forget why I decided to go that route. I feel like it was a OS + Node combination I was trying to get but couldn't find already made. |
Thank you @acalcutt for the updates and @petrsloup for merging this. I already feared this project is unmaintained as the last image on dockerhub is from 2 years ago. I was looking for alternatives and switched to the wifidb image yesterday ;-) When will you release a new official image? |
I can't speak for when this is released, but I have suggested taking our time releasing this Currently there is one known bug a static image rendering I am trying to work out with the maplibre-native team here maplibre/maplibre-native#479. the issue with static tiles looks like this ( acalcutt#5 ). I have a custom maplibre-native fix in my fork which seems to fix it, but it seems to break macos builds....so we are still looking at that. |
These are minimal changes to switch tileserver-gl to use maplibre-gl-native and maplibre-gl-style-spec.
After this change, the OS in the docker images requires an update to support the maplibre-gl-native binaries which are built on ubuntu-20.04
I have also updated the dependencies in the documentation to match what is needed for maplibre-gl-native
Without any other changes, it seems this works on node 10 - node 16. node 18 failed