Preserve environment config

main
Ashelyn Dawn 1 month ago
parent 0230e14e65
commit 336c56204a
No known key found for this signature in database
GPG Key ID: D1980B8C6F349BC1

@ -75,7 +75,7 @@
DynamicUser = "yes";
PrivateTmp = "yes";
Environment = [
"PORT=${toString cfg.port}"
"ROCKET_PORT=${toString cfg.port}"
];
};
};

@ -5,6 +5,7 @@ use config::Config;
use governor::{clock::DefaultClock, state::keyed::DashMapStateStore, Quota, RateLimiter};
use mail_send::{SmtpClientBuilder, Credentials};
use rocket::data::{Limits, ToByteUnit};
use rocket::config::Config as RConfig;
mod config;
mod endpoints;
@ -49,7 +50,7 @@ fn rocket() -> _ {
let rocket_conf = rocket::config::Config {
limits: Limits::default()
.limit("json", 2.kibibytes()),
..Default::default()
..RConfig::from(RConfig::figment())
};
rocket::custom(rocket_conf)

Loading…
Cancel
Save