From 03d2b4385a48ac74b6debe67115b9641d418ea0a Mon Sep 17 00:00:00 2001 From: Tipragot Date: Mon, 12 Feb 2024 15:39:07 +0100 Subject: [PATCH] Adding volume --- Containerfile | 1 + crates/relay-server/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index f9f1ce6..5b19a90 100644 --- a/Containerfile +++ b/Containerfile @@ -8,4 +8,5 @@ FROM alpine:latest WORKDIR /app COPY --from=builder /app/target/release/relay-server . EXPOSE 80/tcp +VOLUME [ "/data" ] CMD ["./relay-server"] \ No newline at end of file diff --git a/crates/relay-server/src/main.rs b/crates/relay-server/src/main.rs index a81410a..afa29b6 100644 --- a/crates/relay-server/src/main.rs +++ b/crates/relay-server/src/main.rs @@ -17,7 +17,7 @@ use uuid::Uuid; lazy_static! { static ref CLIENTS: DashMap>> = DashMap::new(); - static ref DB: Db = sled::open("data.db").expect("unable to open the database"); + static ref DB: Db = sled::open("/data/secrets.db").expect("unable to open the database"); } #[tokio::main]