Point dockerized shiny app at different instances of the API #168
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.
This enables testers to run the shiny app and have it point to different versions of the PROOF API.
Until now, it was a bit of a pain to test changes to the PROOF API that were in dev - you couldn't do it with the shiny app. You had to use proofr (being sure to set the
PROOF_API_BASE_URL
tohttps://proof-api-dev.fredhutch.org
) or the swagger UI at https://proof-api-dev.fredhutch.org .This builds on the previously added ability for testers to run different versions of the shiny app locally using Docker:
Assuming
branch_name
is a valid branch of this repo, which has built successfully, this command will run the Docker image of that branch, which you can then access at http://localhost:3838 .The present change enables two new Makefile targets:
That will run the shiny app and it will point at the dev version of the API.
For developers of the API (mostly me), you can also do this:
Assuming you had an instance of the PROOF API at that URL, this would connect to it.
If the app goes grey
If you do all this, you may see the app go grey, and the following message in the terminal:
If that happens, delete the cookies for the site. Basically, the app is getting confused because the dev version of the app uses different tokens than the production version. Deleting cookies and logging in again will solve this (and you should do this again when you switch back to using the prod version of the app, or running it locally).
Deleting cookies for a specific site works differently in each browser, but in Firefox you can click the lock to the left of the URL bar and then click
Clear cookies and site data...
.A note about branches
The above examples use a non-existent branch name called
branch_name
. In reality you would pick the branch of the app you want to test. If you are not testing anything specific in the shiny app (just functionality in the API) then you can choose themain
ordev
branch (or you will be able to do that, once this PR is merged into those branches).