opencdms-dev / legacy-opencdms-api

⭐🐍 OpenCDMS server application written in Python (FastAPI) and exposing a web interface for `opencdms-app` and other applications
MIT License
3 stars 3 forks source link

44 provide access to multiple named databases #56

Open faysal-ishtiaq opened 2 years ago

faysal-ishtiaq commented 2 years ago

Added a new file in the repository root called climsoft-multi-deployment.yml where you can add new configuration for deployment. Right now it looks like:

test:
  NAME: Climsoft Test
  DATABASE_URI: "mysql+mysqldb://root:password@mysql:3306/mariadb_climsoft_test_db_v4"

And when authenticating, you have to pass a scope like deployment_key:test

Also on swagger authentication form, it looks like:

image

The scopes are autogenerated from deployment keys in climsoft-multi-deployment.yml

If you select multiple deployment key in scopes, only the first one will be taken into consideration.

faysal-ishtiaq commented 2 years ago

Depends on https://github.com/openclimateinitiative/climsoft-api/pull/26