mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-21 22:08:48 +00:00
README.md - added configuration variables & implemented support for 'LEASE_EXPIRE_DAYS'
This commit is contained in:
parent
7ab5e7b264
commit
8d93c92de4
@ -16,6 +16,14 @@ openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout $WORKING_DIR/webse
|
||||
docker run -e DLS_URL=`hostname -i` -e DLS_PORT=443 -p 443:443 -v $WORKING_DIR:/app/cert collinwebdesigns/fastapi-dls:latest
|
||||
```
|
||||
|
||||
# Configuration
|
||||
|
||||
| Variable | Default | Usage |
|
||||
|---------------------|-------------|---------------------------------------------------------------------------|
|
||||
| `DLS_URL` | `localhost` | Used in client-token to tell guest driver where dls instance is reachable |
|
||||
| `DLS_PORT` | `443` | Used in client-token to tell guest driver where dls instance is reachable |
|
||||
| `LEASE_EXPIRE_DAYS` | `90` | Lease time in days |
|
||||
|
||||
# Installation
|
||||
|
||||
**The token file has to be copied! It's not enough to C&P file contents, because there can be special characters.**
|
||||
|
@ -31,7 +31,7 @@ def load_key(filename) -> RsaKey:
|
||||
|
||||
app, db = FastAPI(), dataset.connect('sqlite:///db.sqlite')
|
||||
|
||||
LEASE_EXPIRE_DELTA = relativedelta(minutes=15) # days=90
|
||||
LEASE_EXPIRE_DELTA = relativedelta(days=int(getenv('LEASE_EXPIRE_DAYS', 90)))
|
||||
|
||||
DLS_URL = str(getenv('DLS_URL', 'localhost'))
|
||||
DLS_PORT = int(getenv('DLS_PORT', '443'))
|
||||
|
Loading…
Reference in New Issue
Block a user