Skip to content
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

Inject Vue APP_URL at page load time #2153

Merged
merged 2 commits into from
May 8, 2024

Conversation

williamjallen
Copy link
Collaborator

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 to cdash_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.

@williamjallen williamjallen added this to the v3.5 milestone Apr 28, 2024
Copy link
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@josephsnyder josephsnyder added this pull request to the merge queue May 8, 2024
Merged via the queue into Kitware:master with commit 1c0dbad May 8, 2024
6 checks passed
@williamjallen williamjallen deleted the no-builtin-app-url branch May 8, 2024 19:31
github-merge-queue bot pushed a commit that referenced this pull request May 17, 2024
As of #2153, the `APP_URL`
environment variable is no longer built into the website code, and it is
no longer necessary to run a Mix build after the test suite to restore
the original `.env`. This change will save a few seconds on every CI
run.
github-merge-queue bot pushed a commit that referenced this pull request May 17, 2024
#2153 removed the the last
dependency on environment variables from the Mix build, so `MIX_APP_URL`
is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants