chore: update dockerfile for templates

This commit is contained in:
Jef Roosens 2025-01-10 15:29:45 +01:00
parent 4a4b8bba3d
commit 1d910bc421
Signed by: Jef Roosens
GPG key ID: 21FD3D77D56BAF49
3 changed files with 11 additions and 7 deletions

View file

@ -32,7 +32,9 @@ async fn main() {
let pool = r2d2::Pool::new(manager).unwrap();
db::run_migrations(&pool, &MIGRATIONS).unwrap();
let tera = Tera::new("templates/**/*").unwrap();
let template_dir = std::env::var("TEMPLATE_DIR").unwrap_or(String::from("./templates"));
let tera = Tera::new(&format!("{template_dir}/**/*")).unwrap();
let ctx = Context {
pool,
tera: Arc::new(tera),