Moved config file out of the publicly served directory. Fixes #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 15:05:12 +02:00
co-authored by Claude Opus 5.5
parent ed72dc20f9
commit cc21056ed3
5 changed files with 82 additions and 3 deletions
+1
View File
@@ -28,6 +28,7 @@ Unit tests are `#[cfg(test)] mod tests` at the bottom of the file they test (`#[
## Running locally
- `config.toml` (gitignored) is read from the working directory, or from `-c <path>`. Copy `config_sample.toml`. The bind address comes from `[network]` there, not from `LEPTOS_SITE_ADDR`.
- The config file holds secrets and must stay outside the site root (`target/site`), which is served as static files; the server refuses to start otherwise (`is_publicly_served` in `src/config.rs`). In Docker it is mounted to `/app/config/config.toml`.
- Migrations in `migrations/` are embedded by `sqlx::migrate!()` and run on startup.
- First start seeds an `admin` / `admin` user, a placeholder company, empty mail templates and an appearance row (`create_admin`, `check_company`, `check_messages`, `check_appearance` in `src/main.rs`).
- With `transport = "File"` e-mails are written as `.eml` into `Maildir/` instead of being sent.