biothings / biothings_explorer

TRAPI service for BioThings Explorer
https://explorer.biothings.io
Apache License 2.0
10 stars 11 forks source link

Add an environment variable for custom api_overrides file #657

Open tokebe opened 1 year ago

tokebe commented 1 year ago

API overrides allow for easy testing for new x-bte annotations, however our "preferred" local use-case involves users running BTE from docker-compose.yml (docker compose build && docker compose up). Eventually, we'll be aiming to go a step further and just having BTE on the Docker Hub so users wouldn't have to build a new image.

The current method for api overrides would require users to build a fresh image every time they change the overrides file (though not when changing their x-bte annotations). It would be preferable to avoid this, and simply allow users to pass in an overrides file from an environment variable (OVERRIDES_FILE=/path/to/file.json docker compose up).

So, the requirements:

Most changes will be in update_local_smartapi.js. Documentation should also be added to the following files (though I or @colleenXu may handle this separately):

tokebe commented 1 year ago

Marking this as a good issue for new interns. @rjawesome while I know you're probably looking for things to do, please leave this one for the new interns :)

tokebe commented 1 year ago

@mnarayan1 I'm assigning this issue to you, let me know if you have any questions.