Moved uploaded banner and generated styles to a persistent data directory. Fixes #9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user