Moved config file out of the publicly served directory. Fixes #8
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -21,6 +21,22 @@ The `wasm-bindgen` command line tool must be exactly the same version as the `wa
|
||||
|
||||
`cargo leptos watch`
|
||||
|
||||
## Configuration
|
||||
|
||||
The server reads `config.toml` from the working directory, or from the path given with `-c`. Use `config_sample.toml` as a template.
|
||||
|
||||
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.
|
||||
|
||||
## Running in Docker
|
||||
|
||||
Mount the config file to `/app/config/config.toml`:
|
||||
|
||||
`docker run -p 3000:3000 -v /path/to/config-dir:/app/config rezervator`
|
||||
|
||||
Set `bind_ip = '0.0.0.0'` in the config so the server is reachable from outside the container.
|
||||
|
||||
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.
|
||||
|
||||
## Running tests
|
||||
|
||||
`cargo test --features ssr`
|
||||
|
||||
Reference in New Issue
Block a user