Remove template printing, copy /src/templates dir in Dockerfile

This commit is contained in:
2023-06-16 23:26:18 -05:00
parent cb8964fd3b
commit 2dd47e931e
2 changed files with 1 additions and 2 deletions

View File

@@ -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/target/release/time-banner ${APP}/time-banner
COPY --from=builder /time-banner/src/fonts ${APP}/fonts 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} RUN chown -R $APP_USER:$APP_USER ${APP}

View File

@@ -59,8 +59,6 @@ async fn main() {
async fn root_handler(_connect_info: ConnectInfo<SocketAddr>) -> impl IntoResponse { async fn root_handler(_connect_info: ConnectInfo<SocketAddr>) -> impl IntoResponse {
let renderer = svg::Renderer::new(); let renderer = svg::Renderer::new();
TEMPLATES.get_template_names().into_iter().for_each(|x| println!("{}", x));
let mut context = Context::new(); let mut context = Context::new();
context.insert("text", &_connect_info.ip()); context.insert("text", &_connect_info.ip());
let data = TEMPLATES.render("basic.svg", &context); let data = TEMPLATES.render("basic.svg", &context);