entrypoint

This commit is contained in:
2026-09-30 04:42:07 +01:00
parent 3aee14852a
commit a3fcfffef2
4 changed files with 47 additions and 2 deletions
+5
View File
@@ -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/plm /bin/
COPY --from=builder /usr/local/cargo/bin/plume /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"] CMD ["plume"]
EXPOSE 7878 EXPOSE 7878
+38
View File
@@ -0,0 +1,38 @@
#!/bin/sh
set -eu
ENV_FILE=/app/.env
cat > "$ENV_FILE" <<EOF
BASE_URL=blog.lainoa.eus
ROCKET_SECRET_KEY=${ROCKET_SECRET_KEY}
MAIL_SERVER=smtp.lainoa.eus
MAIL_USER=aitzol
MAIL_PASSWORD=${EMAIL_PASSWORD}
POSTGRES_USER=plume
POSTGRES_DB=plume
POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
DATABASE_URL=postgres://plume:passw0rd@postgres:5432/plume
MIGRATION_DIRECTORY=migrations/postgres
USE_HTTPS=1
ROCKET_ADDRESS=0.0.0.0
ROCKET_PORT=7878
LDAP_ADDR=ldaps://ldap.lainoa.eus:636
LDAP_BASE_DN=cn=users,ou=groups,dc=ldap,dc=lainoa,dc=eus
LDAP_USER_NAME_ATTR=uid
LDAP_USER_MAIL_ATTR=mail
LDAP_TLS=true
LDAP_USER=cn=readonly,dc=ldap,dc=lainoa,dc=eus
LDAP_PASSWORD=${LDAP_PASSWORD}
RUST_BACTRACE=1
EOF
chmod 600 "$ENV_FILE"
exec "$@"
+1 -1
View File
@@ -256,7 +256,7 @@ Then try to restart Plume.
routes::errors::server_error routes::errors::server_error
]) ])
.manage(Arc::new(Mutex::new(mail))) .manage(Arc::new(Mutex::new(mail)))
.manage::<Arc<Mutex<Vec<routes::session::ResetRequest>>>>(Arc::new(Mutex::new(vec![]))) //EZABATU 20260927 .manage::<Arc<Mutex<Vec<routes::session::ResetRequest>>>>(Arc::new(Mutex::new(vec![])))
.manage(dbpool) .manage(dbpool)
.manage(Arc::new(workpool)) .manage(Arc::new(workpool))
.manage(searcher) .manage(searcher)
+3 -1
View File
@@ -11,7 +11,7 @@ use rocket_i18n::I18n;
use std::{ use std::{
borrow::Cow, borrow::Cow,
sync::{Arc, Mutex}, sync::{Arc, Mutex},
time::Instant, // EZABATU 20260927 time::Instant,
}; };
use tracing::warn; use tracing::warn;
use validator::{Validate, ValidationError, ValidationErrors}; use validator::{Validate, ValidationError, ValidationErrors};
@@ -117,6 +117,7 @@ pub fn delete(mut cookies: Cookies<'_>, intl: I18n) -> Flash<Redirect> {
) )
} }
/* EZABATU 20260927
#[derive(Clone)] #[derive(Clone)]
pub struct ResetRequest { pub struct ResetRequest {
pub mail: String, pub mail: String,
@@ -129,6 +130,7 @@ impl PartialEq for ResetRequest {
self.id == other.id self.id == other.id
} }
} }
*/
#[get("/password-reset")] #[get("/password-reset")]
pub fn password_reset_request_form(conn: DbConn, rockets: PlumeRocket) -> Ructe { pub fn password_reset_request_form(conn: DbConn, rockets: PlumeRocket) -> Ructe {