From 415d32299bb500f9b18e9854f4d9359d8939da41 Mon Sep 17 00:00:00 2001 From: Greg Heartsfield Date: Fri, 31 Dec 2021 14:05:11 -0600 Subject: [PATCH] fix: docker run references the correct database file --- Dockerfile | 5 +++-- src/main.rs | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 27bdeeb..9c6a4b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,6 @@ RUN cargo build --release FROM debian:buster-slim ARG APP=/usr/src/app ARG APP_DATA=/usr/src/app/db - RUN apt-get update \ && apt-get install -y ca-certificates tzdata sqlite3 \ && rm -rf /var/lib/apt/lists/* @@ -38,4 +37,6 @@ USER $APP_USER WORKDIR ${APP} ENV RUST_LOG=info -CMD ["./nostr-rs-relay --db $APP_DATA"] +ENV APP_DATA=${APP_DATA} + +CMD ./nostr-rs-relay --db ${APP_DATA} diff --git a/src/main.rs b/src/main.rs index 6c9adf4..9e6f54c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,6 @@ fn main() -> Result<(), Error> { // get database directory from args let args: Vec = env::args().collect(); let db_dir: Option = db_from_args(args); - info!("Using database: {:?}", db_dir); { let mut settings = config::SETTINGS.write().unwrap(); // replace default settings with those read from config.toml