moved templates into own dir

This commit is contained in:
Edward Shen 2019-05-03 01:25:56 -04:00
parent f42c70b27e
commit 443dca2841
Signed by: edward
GPG key ID: F350507060ED6C90
3 changed files with 4 additions and 3 deletions

View file

@ -20,6 +20,7 @@ WORKDIR /app
COPY --from=builder /app/target/release/endstat /app COPY --from=builder /app/target/release/endstat /app
COPY ./config /app/config COPY ./config /app/config
COPY ./templates /app/templates
RUN mv /app/config/endstat_conf.example.ron /app/config/endstat_conf.ron RUN mv /app/config/endstat_conf.example.ron /app/config/endstat_conf.ron
EXPOSE 8080 EXPOSE 8080

View file

@ -14,10 +14,10 @@ extern crate ring;
mod config; mod config;
mod handlers; mod handlers;
mod updater;
mod results; mod results;
mod updater;
use self::{config::*, handlers::*, updater::*, results::QueryResults}; use self::{config::*, handlers::*, results::QueryResults, updater::*};
use actix::System; use actix::System;
use actix_web::{middleware::Logger, web::resource, App, HttpServer}; use actix_web::{middleware::Logger, web::resource, App, HttpServer};
use ron::de::from_str; use ron::de::from_str;
@ -51,7 +51,7 @@ fn main() {
let clone_state = Arc::clone(&state); let clone_state = Arc::clone(&state);
HttpServer::new(move || { HttpServer::new(move || {
let tera = compile_templates!("./config/templates/**/*"); let tera = compile_templates!("./templates/**/*");
let state = Arc::clone(&state); let state = Arc::clone(&state);
App::new() App::new()