From c9034a7276dbdf87649c9946ef5072de58097259 Mon Sep 17 00:00:00 2001 From: FxQnLr Date: Mon, 12 Feb 2024 15:50:58 +0100 Subject: remove cargo chef --- Dockerfile | 15 ++++----------- src/config.rs | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index d4473e9..b75a0e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,22 +5,15 @@ RUN cd /tmp && \ mkdir /dpkg && \ for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done -FROM lukemathwalker/cargo-chef:latest-rust-1.73.0 as chef -WORKDIR app - -FROM chef AS planner +FROM rust:1.76 as builder +WORKDIR /app COPY . . -RUN cargo chef prepare --recipe-path recipe.json +RUN SQLX_OFFLINE=true cargo install --path . -FROM chef as builder -COPY --from=planner /app/recipe.json recipe.json -RUN cargo chef cook --release --recipe-path recipe.json -COPY . . -RUN cargo build --release FROM gcr.io/distroless/cc COPY --from=builder /app/target/release/webol / COPY --from=deb_extractor /dpkg / EXPOSE 7229 -ENTRYPOINT ["./webol"] \ No newline at end of file +ENTRYPOINT ["./webol"] diff --git a/src/config.rs b/src/config.rs index e88ddab..4319ffc 100644 --- a/src/config.rs +++ b/src/config.rs @@ -16,7 +16,7 @@ impl Config { .set_default("pingtimeout", 10)? .add_source(File::with_name("config.toml").required(false)) .add_source(File::with_name("config.dev.toml").required(false)) - .add_source(config::Environment::with_prefix("WEBOL").separator("_")) + .add_source(config::Environment::with_prefix("WEBOL").prefix_separator("_")) .build()?; config.try_deserialize() -- cgit v1.2.3