summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFxQnLr <[email protected]>2024-02-12 15:50:58 +0100
committerFxQnLr <[email protected]>2024-02-12 15:50:58 +0100
commitc9034a7276dbdf87649c9946ef5072de58097259 (patch)
tree9695c326bdb5501a0ea6e51d0827292d4ef8cf50
parentca395b81bcadb9dde9214098f2cab0c7a3561574 (diff)
downloadwebol-c9034a7276dbdf87649c9946ef5072de58097259.tar
webol-c9034a7276dbdf87649c9946ef5072de58097259.tar.gz
webol-c9034a7276dbdf87649c9946ef5072de58097259.zip
remove cargo chef
-rw-r--r--Dockerfile15
-rw-r--r--src/config.rs2
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 && \
5 mkdir /dpkg && \ 5 mkdir /dpkg && \
6 for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done 6 for deb in *.deb; do dpkg --extract $deb /dpkg || exit 10; done
7 7
8FROM lukemathwalker/cargo-chef:latest-rust-1.73.0 as chef 8FROM rust:1.76 as builder
9WORKDIR app 9WORKDIR /app
10
11FROM chef AS planner
12COPY . . 10COPY . .
13RUN cargo chef prepare --recipe-path recipe.json 11RUN SQLX_OFFLINE=true cargo install --path .
14 12
15FROM chef as builder
16COPY --from=planner /app/recipe.json recipe.json
17RUN cargo chef cook --release --recipe-path recipe.json
18COPY . .
19RUN cargo build --release
20 13
21FROM gcr.io/distroless/cc 14FROM gcr.io/distroless/cc
22COPY --from=builder /app/target/release/webol / 15COPY --from=builder /app/target/release/webol /
23COPY --from=deb_extractor /dpkg / 16COPY --from=deb_extractor /dpkg /
24 17
25EXPOSE 7229 18EXPOSE 7229
26ENTRYPOINT ["./webol"] \ No newline at end of file 19ENTRYPOINT ["./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 {
16 .set_default("pingtimeout", 10)? 16 .set_default("pingtimeout", 10)?
17 .add_source(File::with_name("config.toml").required(false)) 17 .add_source(File::with_name("config.toml").required(false))
18 .add_source(File::with_name("config.dev.toml").required(false)) 18 .add_source(File::with_name("config.dev.toml").required(false))
19 .add_source(config::Environment::with_prefix("WEBOL").separator("_")) 19 .add_source(config::Environment::with_prefix("WEBOL").prefix_separator("_"))
20 .build()?; 20 .build()?;
21 21
22 config.try_deserialize() 22 config.try_deserialize()