2026-01-01 19:58:16 +00:00
|
|
|
# lapp
|
|
|
|
|
|
2026-01-01 21:33:12 +01:00
|
|
|
list app
|
|
|
|
|
|
|
|
|
|
install
|
|
|
|
|
1. clone repo
|
|
|
|
|
2. create subfolder "instance" to store database file
|
2026-07-19 11:29:10 +02:00
|
|
|
3. for an initial instance, run `.venv/bin/python initialize_data.py`
|
2026-01-01 21:33:12 +01:00
|
|
|
4. add the below config to your apache2 enabled site
|
2026-05-14 21:16:51 +02:00
|
|
|
|
|
|
|
|
## Secrets and configuration
|
|
|
|
|
|
2026-07-19 09:58:27 +02:00
|
|
|
LAPP stores its private configuration in `instance/secrets.yaml`. On first
|
|
|
|
|
startup, missing values are generated automatically and the file permissions are
|
|
|
|
|
set to `0600`.
|
2026-05-14 21:16:51 +02:00
|
|
|
|
2026-07-19 09:58:27 +02:00
|
|
|
The file contains the Flask session key, API application key, database URI,
|
|
|
|
|
initial account credentials, initial group secrets, and the Fernet key used by
|
|
|
|
|
`test.py`. To change the database, edit `runtime.database_uri` in this file.
|
2026-05-14 21:16:51 +02:00
|
|
|
|
2026-07-19 09:58:27 +02:00
|
|
|
Keep `runtime.secret_key` stable: changing it logs users out and invalidates
|
|
|
|
|
existing auto-login cookies. `runtime.application_key` is used by
|
|
|
|
|
`/api/validate_key`.
|
2026-05-14 21:16:51 +02:00
|
|
|
|
2026-07-19 09:58:27 +02:00
|
|
|
The entire `instance/` directory is ignored by Git. Back up `secrets.yaml`
|
|
|
|
|
securely and never commit or share it.
|
2026-05-14 21:16:51 +02:00
|
|
|
|
|
|
|
|
## Initial data secrets
|
|
|
|
|
|
|
|
|
|
`initialize_data.py` creates initial users and groups only when the database has
|
2026-07-19 09:58:27 +02:00
|
|
|
no users yet. Set the values under `initial_data` in `instance/secrets.yaml`
|
|
|
|
|
before running it, or use the securely generated defaults. The script prints the
|
|
|
|
|
location of the credentials when it creates the initial data.
|