-
Notifications
You must be signed in to change notification settings - Fork 61
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
Bundle sprites and font glyphs in frontend #45
base: main
Are you sure you want to change the base?
Conversation
0316f3b
to
63d7fb4
Compare
Resulting files in
|
Works fine for sprites, fonts are present but haven't tested with the styles actually using these yet. |
App is now using the bundled assets. |
I am not super clear on exactly what should go where between tileserver and nginx and if Note that style template is now included at build rather than read from volume. I get a couple of console errors like Not network errors, though. Maybe some mismatch? |
I mentioned this in #43 but I don't like the idea of putting these mapbox dependencies into the frontend. I do all my frontend development outside of docker and I don't like the idea of a bunch of native code running outside of docker. It sounds like node-fontnik even installs some stuff system-wide during its own installation. |
What we definitely could do though is use a second sub-image (I don't know what they're actually called, but those "builder" images) inside the nginx Dockerfile. Currently we have one builder that does the quasar build, we could have another that does the font/glyph building. Once it's moved outside of the frontend's dev dependencies, the frontend package will be unencumbered by those deps, and, the dev server can proxy requests to any assets in the |
Sounds reasonable! |
Cool! I do like the idea of moving all this stuff to the nginx image though. The tileserver config.json.template can stay how it is in this PR if you don't want to touch it, but we should probably open an issue to pare it down to the bare essentials in the future. I'm not sure exactly what that would look like though and it is a very frustrating piece of software to configure in my experience. A very nice piece of tech, but I don't understand it. |
Hey! Any progress here? It looks like you've been spelunking into the mapbox/mapnik dependencies, which I think I will need to do if I want to evaluate Mapbox Carmen for #50, so I thought I'd ask how it's going. |
So, the spritezero and especially mapnik projects and builds are quite messy and for now I think I will be abandoning getting the whole chain build from source, which I agree is kind of problematic. So practically these means that aarch64 support will have to be a separate effort. I do think that someone more familiar with cmake would be able to figure it out. Are there alternatives to spritezero? mapnik does seem like it could end up being technical debt down the line. Other than that, I'll see if I can clean this up in the following days, including moving the deps out of the actual final image. |
Yes it's possible to remove the mapnik dependency for sprite generation, see how sprites are handled Replace mapnik with sharp for SVG rendering it's pretty straightforward |
Thank you for pointing that out! This seems like a much more lightweight alternative. |
See# #43
TODO: