Customers can view and cancel their booking through a link in the e-mail. Fixes #18

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 15:25:46 +02:00
co-authored by Claude Opus 5.5
parent d610479c52
commit 91c2a06a3e
29 changed files with 797 additions and 63 deletions
+10
View File
@@ -27,6 +27,14 @@ The server reads `config.toml` from the working directory, or from the path give
The file contains the database and SMTP passwords and the session key. Keep it outside the site directory (`target/site`): everything in there is served as static files. The server refuses to start when the config file is inside it.
## Links in e-mails
E-mails about a booking contain a link to a page where the customer can view the booking and cancel it. Set `public_url` in the `[network]` section of the config to the address under which the application is reached from outside (e.g. `https://booking.example.com`). Without it the links use the address of the request that caused the e-mail, as the reverse proxy reports it; that is safe only when the proxy passes requests for your domain only, otherwise somebody could have e-mails sent with links to another site.
In the mail templates the link is written as `#link#`. E-mails for the customer about a new and an approved booking get it at the end when their template does not contain it. How long before its start a booking can be cancelled is set with the company data in the admin portal.
Times of bookings are local times, and the deadline for cancelling is compared with the clock of the server. Make sure the server runs in the time zone of your customers.
## Database connections
Each instance opens database connections on demand, up to `max_connections` in the `[database]` section of the config (10 by default), and closes the ones that stay idle. When many instances share one PostgreSQL server, the sum of their limits must stay below the server's own `max_connections` (100 by default): lower the limit per instance, raise it on the server, or put PgBouncer in front of PostgreSQL.
@@ -56,6 +64,8 @@ Mount the config file to `/app/config/config.toml` and a persistent volume for t
Set `bind_ip = '0.0.0.0'` in the config so the server is reachable from outside the container.
The clock in the container is UTC unless you set the time zone, e.g. `-e TZ=Europe/Prague`. Bookings are in local time, so set it.
Older versions of the image expected the config in `/app/target/site/data/config.toml`, where it could be downloaded from `/data/config.toml`. If you ran such a container, move the file and change the database password, the SMTP password and the session key.
## Health check