updated for reversed proxy

This commit is contained in:
2026-07-17 17:53:36 +02:00
parent f1ed598ebe
commit 2cda77b9a5
4 changed files with 108 additions and 35 deletions
+17 -3
View File
@@ -10,11 +10,11 @@ Amounts and worked/vacation/sick statuses selected for dates are stored persiste
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
waitress-serve --host=0.0.0.0 --port=9009 app:app
waitress-serve --host=0.0.0.0 --port=9009 fatima:app
```
To use a different port, substitute it in the command (for example,
`--port=8080`). The application exposes its WSGI callable as `app:app`, so it
`--port=8080`). The application exposes its WSGI callable as `fatima:app`, so it
can also be used by platforms that ask for an application entry point.
Set the username, password, and Flask signing key in `config.yaml` before starting. This file is excluded from Git. Use `config.example.yaml` as the documented template when setting up another machine.
@@ -30,6 +30,20 @@ amounts:
The €0 and custom-amount controls remain available automatically.
## Reverse proxy path
The app is served below `/fatima` by default. Configure the external path in
`config.yaml`:
```yaml
flask:
url_prefix: "/fatima"
```
Set `URL_PREFIX` in the environment to override this value at deployment time.
Use an empty value (`url_prefix: ""` or `URL_PREFIX=`) to serve from `/` instead.
The reverse proxy must preserve the prefix when forwarding requests to Waitress.
## Import the Excel calendar
Preview an import without changing the database:
@@ -40,7 +54,7 @@ python scripts/import_excel.py /path/to/fatima.xlsx
Add `--apply` to import. The command backs up the existing SQLite file before updating it.
On the iPhone, visit `http://<your-computer-on-the-local-network>:9009`.
On the iPhone, visit `http://<your-computer-on-the-local-network>:9009/fatima/`.
Waitress listens on all network interfaces with the command above. For anything
exposed beyond a trusted home network, put it behind an HTTPS reverse proxy.