From a3fcfffef2a63b5e0fd741319a5c1dbb39154249 Mon Sep 17 00:00:00 2001 From: Aitzol Date: Wed, 30 Sep 2026 04:42:07 +0100 Subject: [PATCH] entrypoint --- Containerfile | 5 +++++ entrypoint.sh | 38 ++++++++++++++++++++++++++++++++++++++ src/main.rs | 2 +- src/routes/session.rs | 4 +++- 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 entrypoint.sh diff --git a/Containerfile b/Containerfile index de817c3b..d8271e70 100644 --- a/Containerfile +++ b/Containerfile @@ -52,6 +52,11 @@ COPY --from=builder /app /app COPY --from=builder /usr/local/cargo/bin/plm /bin/ COPY --from=builder /usr/local/cargo/bin/plume /bin/ + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +RUN chmod 755 /usr/local/bin/entrypoint.sh + +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["plume"] EXPOSE 7878 diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 00000000..b1f13da8 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,38 @@ +#!/bin/sh +set -eu + +ENV_FILE=/app/.env + +cat > "$ENV_FILE" <>>>(Arc::new(Mutex::new(vec![]))) + //EZABATU 20260927 .manage::>>>(Arc::new(Mutex::new(vec![]))) .manage(dbpool) .manage(Arc::new(workpool)) .manage(searcher) diff --git a/src/routes/session.rs b/src/routes/session.rs index 92a5003e..7212d5d1 100644 --- a/src/routes/session.rs +++ b/src/routes/session.rs @@ -11,7 +11,7 @@ use rocket_i18n::I18n; use std::{ borrow::Cow, sync::{Arc, Mutex}, - time::Instant, + // EZABATU 20260927 time::Instant, }; use tracing::warn; use validator::{Validate, ValidationError, ValidationErrors}; @@ -117,6 +117,7 @@ pub fn delete(mut cookies: Cookies<'_>, intl: I18n) -> Flash { ) } +/* EZABATU 20260927 #[derive(Clone)] pub struct ResetRequest { pub mail: String, @@ -129,6 +130,7 @@ impl PartialEq for ResetRequest { self.id == other.id } } +*/ #[get("/password-reset")] pub fn password_reset_request_form(conn: DbConn, rockets: PlumeRocket) -> Ructe {