Files
Dennis Nemec d30d43df3a Backend als Windows-Dienst registrierbar (SCM, wie Mail-Client)
Das Backend kann jetzt — analog zum Mail-Client — als Windows-Dienst laufen.

- main() refaktoriert: App-Logik in run_app(shutdown, service_mode); eigene
  tokio-Runtime statt #[tokio::main]. Windows startet zuerst den SCM-Dispatcher,
  fällt bei interaktivem Start auf Konsolenmodus zurück (--console erzwingt ihn).
- src/service.rs (windows-only): SCM-Integration via windows-service-Crate,
  Stop/Shutdown-Handler, Running/Stopped-Status. Setzt das Arbeitsverzeichnis
  aufs EXE-Verzeichnis (Dienst startet sonst in System32), damit config.toml/
  data/logs daneben liegen. Fallback-Log bei Boot-Fehler.
- Graceful Shutdown: GSD-Lizenz-Freigabe in den Serve-Wrapper gezogen (greift
  in beiden Modi); Stop-Trigger ist das übergebene shutdown-Future.
- Logging: Konsolenmodus → stderr (wie bisher); Dienst-Modus → rollende
  Tagesdatei (tracing-appender) unter [logging] dir (Default logs/).
- install-service.ps1 / uninstall-service.ps1 (Dienst "Holzleitner Backend").
- README: Windows-Dienst-Abschnitt; .gitignore: /logs + Fatal-Log.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 18:12:12 +02:00

52 lines
1.9 KiB
TOML

[workspace]
resolver = "3"
members = [
"crates/domain",
"crates/application",
"crates/infrastructure",
"crates/api",
]
[workspace.package]
version = "0.1.0"
edition = "2024"
license = "Proprietary"
authors = ["Holzleitner GmbH"]
[workspace.dependencies]
# === Externe Crates (zentral gepinnt) =====================================
serde = { version = "1", features = ["derive"] }
serde_json = "1"
uuid = { version = "1", features = ["serde", "v4"] }
chrono = { version = "0.4", default-features = false, features = ["serde", "clock"] }
async-trait = "0.1"
thiserror = "2"
tokio = { version = "1", features = ["full"] }
axum = { version = "0.8", features = ["multipart"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["trace", "cors"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-appender = "0.2"
sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "uuid", "chrono", "macros"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "multipart"] }
# MSSQL (ERPframe) — nativer async-Treiber. Kein Pool: der ERP-Pull läuft
# einmal täglich, eine frische Verbindung pro Lauf reicht.
tiberius = { version = "0.12", default-features = false, features = ["chrono", "rustls", "tds73"] }
tokio-util = { version = "0.7", features = ["compat"] }
tokio-cron-scheduler = "0.13"
jsonwebtoken = "9"
toml = "0.8"
anyhow = "1"
# Windows-Dienst-Integration (SCM). Nur unter Windows kompiliert.
windows-service = "0.6"
sha2 = "0.10"
imagesize = "0.13"
utoipa = { version = "5", features = ["axum_extras", "chrono", "uuid"] }
utoipa-swagger-ui = { version = "9", features = ["axum"] }
# === Interne Crates =======================================================
holzleitner-domain = { path = "crates/domain" }
holzleitner-application = { path = "crates/application" }
holzleitner-infrastructure = { path = "crates/infrastructure" }