Skip to content

Prebuild webpage in Docker and load VUE_APP_CESIUM_TOKEN dynamically#465

Open
bedaberner wants to merge 2 commits intoArduPilot:masterfrom
bedaberner:master
Open

Prebuild webpage in Docker and load VUE_APP_CESIUM_TOKEN dynamically#465
bedaberner wants to merge 2 commits intoArduPilot:masterfrom
bedaberner:master

Conversation

@bedaberner
Copy link
Contributor

This PR is based in my desire to host this app in a low ressource (k8s) environment.

Currently the prebuilt docker uses npm run dev to host the app which triggers a very ressource intense rebuild of the page.
My goal was to precompile the app during the docker build process to get around this wasteful process.
To achieve this I had to:

  1. Use npm run build during the docker build process and set npm start up so it serves the precompiled page.
  2. As we don't recompile on every start anymore, VUE_APP_CESIUM_TOKEN has to be loaded dinamically on startup. This is the bunch of the changes in this PR.
  3. Add an error message if no VUE_APP_CESIUM_TOKEN is loaded as It took me a while to find out this was a problem.
  4. Change the Cesium asset as mentioned here How to load hi res imagery? #463 (comment) to and I think this fixes How to load hi res imagery? #463.
  5. Adapt the Documentation

Sorry for not splitting the changes nicely in multiple commits, I thought this would be a very easy fix but had to change more and more things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to load hi res imagery?

1 participant