diff --git a/.DEBIAN/postinst b/.DEBIAN/postinst index 60e5dcb..f0d9bdc 100644 --- a/.DEBIAN/postinst +++ b/.DEBIAN/postinst @@ -41,10 +41,29 @@ if [[ ! -f $CONFIG_DIR/env ]]; then echo "> Writing initial config ..." touch $CONFIG_DIR/env cat <$CONFIG_DIR/env +# Toggle debug mode +#DEBUG=false + +# Where the client can find the DLS server DLS_URL=127.0.0.1 DLS_PORT=443 + +# CORS configuration +## comma separated list without spaces +#CORS_ORIGINS="https://$DLS_URL:$DLS_PORT" + +# Lease expiration in days LEASE_EXPIRE_DAYS=90 + +# Database location +## https://docs.sqlalchemy.org/en/14/core/engines.html DATABASE=sqlite:///$CONFIG_DIR/db.sqlite + +# UUIDs for identifying the instance +#SITE_KEY_XID="00000000-0000-0000-0000-000000000000" +#INSTANCE_REF="00000000-0000-0000-0000-000000000000" + +# Site-wide signing keys INSTANCE_KEY_RSA=$CONFIG_DIR/instance.private.pem INSTANCE_KEY_PUB=$CONFIG_DIR/instance.public.pem diff --git a/.PKGBUILD/fastapi-dls.default b/.PKGBUILD/fastapi-dls.default index 079679b..0add216 100644 --- a/.PKGBUILD/fastapi-dls.default +++ b/.PKGBUILD/fastapi-dls.default @@ -11,7 +11,7 @@ CORS_ORIGINS="https://$DLS_URL:$DLS_PORT" LEASE_EXPIRE_DAYS=90 # Database location -## See https://dataset.readthedocs.io/en/latest/quickstart.html for details +## https://docs.sqlalchemy.org/en/14/core/engines.html DATABASE="sqlite:////var/lib/fastapi-dls/db.sqlite" # UUIDs for identifying the instance diff --git a/README.md b/README.md index 92377fd..c9e072a 100644 --- a/README.md +++ b/README.md @@ -280,18 +280,18 @@ After first success you have to replace `--issue` with `--renew`. # Configuration -| Variable | Default | Usage | -|---------------------|----------------------------------------|---------------------------------------------------------------------------------------| -| `DEBUG` | `false` | Toggles `fastapi` debug mode | -| `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 | -| `DATABASE` | `sqlite:///db.sqlite` | See [official dataset docs](https://dataset.readthedocs.io/en/latest/quickstart.html) | -| `CORS_ORIGINS` | `https://{DLS_URL}` | Sets `Access-Control-Allow-Origin` header (comma separated string) | -| `SITE_KEY_XID` | `00000000-0000-0000-0000-000000000000` | Site identification uuid | -| `INSTANCE_REF` | `00000000-0000-0000-0000-000000000000` | Instance identification uuid | -| `INSTANCE_KEY_RSA` | `/cert/instance.private.pem` | Site-wide private RSA key for singing JWTs | -| `INSTANCE_KEY_PUB` | `/cert/instance.public.pem` | Site-wide public key | +| Variable | Default | Usage | +|---------------------|----------------------------------------|-------------------------------------------------------------------------------------| +| `DEBUG` | `false` | Toggles `fastapi` debug mode | +| `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 | +| `DATABASE` | `sqlite:///db.sqlite` | See [official SQLAlchemy docs](https://docs.sqlalchemy.org/en/14/core/engines.html) | +| `CORS_ORIGINS` | `https://{DLS_URL}` | Sets `Access-Control-Allow-Origin` header (comma separated string) | +| `SITE_KEY_XID` | `00000000-0000-0000-0000-000000000000` | Site identification uuid | +| `INSTANCE_REF` | `00000000-0000-0000-0000-000000000000` | Instance identification uuid | +| `INSTANCE_KEY_RSA` | `/cert/instance.private.pem` | Site-wide private RSA key for singing JWTs | +| `INSTANCE_KEY_PUB` | `/cert/instance.public.pem` | Site-wide public key | # Setup (Client)