mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-12-21 15:08:54 +01:00
feat(config): Read secrets from .env file and environemnt variables
This commit is contained in:
16
README.md
16
README.md
@@ -37,3 +37,19 @@ Create a `secrets.json` in the root of this repo with the following structure (v
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively, the secrets can be provided as environment variables. One option to do so is to add a `.env` file with the following layout:
|
||||
```js
|
||||
PYTHON_POSTGRES_USERNAME=postgres
|
||||
PYTHON_POSTGRES_PASSWORD=postgres
|
||||
PYTHON_POSTGRES_HOST=localhost
|
||||
PYTHON_POSTGRES_DATABASE=postgres
|
||||
PYTHON_POSTGRES_PORT=5432
|
||||
PYTHON_MONGO_USERNAME=username
|
||||
PYTHON_MONGO_HOST=localhost
|
||||
PYTHON_MONGO_PASSWORD=password
|
||||
PYTHON_MONGO_PORT=27017
|
||||
PYTHON_MONGO_DATABASE=transparenzregister
|
||||
```
|
||||
|
||||
The prefix `PYTHON_` can be customized by setting a different `prefix` when constructing the ConfigProvider.
|
||||
|
||||
Reference in New Issue
Block a user