Expand config search area

This commit is contained in:
LittleSheep 2024-02-14 15:06:51 +08:00
parent 515f086f19
commit 0b38c4a470
2 changed files with 2 additions and 6 deletions

View File

@ -8,11 +8,6 @@ COPY . .
ENV RUSTFLAGS="-C target-feature=-crt-static"
RUN cargo build --release
# Runtime
FROM alpine:latest
COPY --from=roadsign-server /source/target/release/roadsign /roadsign/server
EXPOSE 81
CMD ["/roadsign/server"]
CMD ["/source/target/release/roadsign"]

View File

@ -3,6 +3,7 @@ use config::Config;
pub fn load_settings() -> Config {
Config::builder()
.add_source(config::File::with_name("Settings"))
.add_source(config::File::with_name("/Settings"))
.add_source(config::Environment::with_prefix("ROADSIGN"))
.build()
.unwrap()