Inject Vue APP_URL at page load time #2153
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The CDash UI currently needs the
APP_URL
environment variable at build time, which means that our Docker container startup time is limited by the time it takes to build the UI. It also means that our container is not fully static.This PR adds a data attribute to the Vue mount point, which means the
APP_URL
is no longer built into the UI. To take advantage of this, I added commands to build the website during the Docker image build, and added a new--initial-docker-install
flag tocdash_install
which skips unnecessary steps if it's the first run of the script. The CDash container is now able to begin serving requests less than 5 seconds after starting if no migrations are necessary.Although I have not tested it yet, I believe this change also means that the web service can be scaled horizontally because each instance is derived from the same image with the same cache busting tokens.