-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add configuration to run against local APIs #11551
Add configuration to run against local APIs #11551
Conversation
Size Change: +166 B (+0.02%) Total Size: 1.02 MB
ℹ️ View Unchanged
|
I've taken to running |
Also excellent branch name |
This probably means the servers folder isn't created as part of the nginx install, that makes sense as I think I see it being created over here where i've "borrowed" some of these scripts from. |
20b8674
to
59b9414
Compare
59b9414
to
81f9756
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what we discussed it works well locally for me; I can access https://www-dev.wellcomecollection.org/search and get results for content only (not running the catalogue api). The identity icon does appear as I run them both, although I can't sign in, which I believe we said was expected. The links to it also appear to be the correct ones.
Exciting stuff, thank you! (Slack thread for legacy, and I've asked Gareth and David to also have a look!)
What does this change?
Resolves wellcomecollection/platform#5892
This change adds a script that creates a local nginx configuration to proxy requests to locally running APIs using consistent domain names and with SSL.
When configured
https://www-dev.wellcomecollection.org
andhttps://api-dev.wellcomecollection.org
are made available locally, served over https using development certificates added to the system root store. Requests are routed to distinct ports and paths so that the Concepts, Content, Catalogue Search & Catalogue Items APIs when run locally can be accessed from the locally running copy of the content app.This work borrows heavily from https://github.com/guardian/dev-nginx
Note
Requests, Account and Identity APIs have not been included yet as these require more complicated configuration. This change remove the ability to use content & identity locally as it is little used (I think), unnecessarily complex and doesn't play nicely with the nginx configuration.
This change depends on downstream changes to the following projects:
How to test
Running the Catalogue API locally:
sbt "project search" "~reStart"
: Starts the Search APIsbt "project items" "~reStart"
: Starts the Items API./concepts
runyarn && yarn dev
: Starts the Concepts APIRunning the Content API locally:
Check out https://github.com/wellcomecollection/content-api
In the
./api
folder run:yarn && yarn dev
Run
yarn config-local-apis
and follow the instructionsRun the APIs you wish to test locally, observe that requests are routed to those APIs.
How can we measure success?
Development that crosses the API boundary is easier to do!
Have we considered potential risks?
This should only impact local development.