Added docker building.
This commit is contained in:
@ -11,9 +11,10 @@ pub fn create(args: ServerConfig, token: Arc<RwLock<Option<String>>>) -> anyhow:
|
||||
let addr = (args.host.clone(), args.port);
|
||||
let server = HttpServer::new(move || {
|
||||
App::new()
|
||||
.wrap(actix_web::middleware::Logger::new(
|
||||
"\"%r\" \"-\" \"%s\" \"%a\" \"%D\"",
|
||||
))
|
||||
.wrap(
|
||||
actix_web::middleware::Logger::new("\"%r\" \"-\" \"%s\" \"%a\" \"%D\"")
|
||||
.exclude("/health"),
|
||||
)
|
||||
.app_data(Data::new(token.clone()))
|
||||
.app_data(Data::new(args.clone()))
|
||||
.service(login)
|
||||
|
@ -1,5 +1,16 @@
|
||||
use askama::Template;
|
||||
|
||||
/// Index pages.
|
||||
///
|
||||
/// This page is used to authenticate users.
|
||||
/// It has two states: activated or not.
|
||||
///
|
||||
/// It the activated is false, we
|
||||
/// render two input fields, with telegram code
|
||||
/// and server's password.
|
||||
///
|
||||
/// If the user is authenticated, we just render
|
||||
/// some random information.
|
||||
#[derive(Template)]
|
||||
#[template(path = "index.html")]
|
||||
pub struct Index {
|
||||
|
Reference in New Issue
Block a user