Moved uploaded banner and generated styles to a persistent data directory. Fixes #9

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-12 15:25:57 +02:00
co-authored by Claude Opus 5.5
parent cc21056ed3
commit 21b7007d28
10 changed files with 270 additions and 49 deletions
+8 -2
View File
@@ -27,11 +27,17 @@ 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.
## Data directory
Files created while the application runs (the uploaded banner and the styles generated for it) are stored in the data directory and served under `/data`. By default it is `data` in the working directory; change it with `data_dir` in the `[storage]` section of the config. Keep this directory when you upgrade the application and include it in backups. Never put the config file into it.
When upgrading from a version that kept these files in `target/site/data`, move the banner image to the data directory. The style for it is generated again on start.
## Running in Docker
Mount the config file to `/app/config/config.toml`:
Mount the config file to `/app/config/config.toml` and a persistent volume for the data directory to `/app/data`:
`docker run -p 3000:3000 -v /path/to/config-dir:/app/config rezervator`
`docker run -p 3000:3000 -v /path/to/config-dir:/app/config -v rezervator-data:/app/data rezervator`
Set `bind_ip = '0.0.0.0'` in the config so the server is reachable from outside the container.