From 2dd47e931e2653978b5e626c70ef3576f8059811 Mon Sep 17 00:00:00 2001 From: Xevion Date: Fri, 16 Jun 2023 23:26:18 -0500 Subject: [PATCH] Remove template printing, copy /src/templates dir in Dockerfile --- Dockerfile | 1 + src/main.rs | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e36e22b..6d2ddb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,7 @@ RUN groupadd $APP_USER \ COPY --from=builder /time-banner/target/release/time-banner ${APP}/time-banner COPY --from=builder /time-banner/src/fonts ${APP}/fonts +COPY --from=builder /time-banner/src/templates ${APP}/templates RUN chown -R $APP_USER:$APP_USER ${APP} diff --git a/src/main.rs b/src/main.rs index a4593b6..d914c7c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,8 +59,6 @@ async fn main() { async fn root_handler(_connect_info: ConnectInfo) -> impl IntoResponse { let renderer = svg::Renderer::new(); - TEMPLATES.get_template_names().into_iter().for_each(|x| println!("{}", x)); - let mut context = Context::new(); context.insert("text", &_connect_info.ip()); let data = TEMPLATES.render("basic.svg", &context);