chore: update dockerfile for templates
This commit is contained in:
parent
4a4b8bba3d
commit
1d910bc421
3 changed files with 11 additions and 7 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue