From 0b38c4a470996d8ab47a93adfa8e53e870d4690d Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 14 Feb 2024 15:06:51 +0800 Subject: [PATCH] :sparkles: Expand config search area --- Dockerfile | 7 +------ src/config/loader.rs | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39e1fa0..db82fda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] \ No newline at end of file +CMD ["/source/target/release/roadsign"] \ No newline at end of file diff --git a/src/config/loader.rs b/src/config/loader.rs index 434a96e..b70afe0 100644 --- a/src/config/loader.rs +++ b/src/config/loader.rs @@ -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()