mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-22 00:59:07 -05:00
fix: docker run references the correct database file
This commit is contained in:
parent
5a19a8876f
commit
415d32299b
|
@ -15,7 +15,6 @@ RUN cargo build --release
|
||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
ARG APP=/usr/src/app
|
ARG APP=/usr/src/app
|
||||||
ARG APP_DATA=/usr/src/app/db
|
ARG APP_DATA=/usr/src/app/db
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y ca-certificates tzdata sqlite3 \
|
&& apt-get install -y ca-certificates tzdata sqlite3 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
@ -38,4 +37,6 @@ USER $APP_USER
|
||||||
WORKDIR ${APP}
|
WORKDIR ${APP}
|
||||||
|
|
||||||
ENV RUST_LOG=info
|
ENV RUST_LOG=info
|
||||||
CMD ["./nostr-rs-relay --db $APP_DATA"]
|
ENV APP_DATA=${APP_DATA}
|
||||||
|
|
||||||
|
CMD ./nostr-rs-relay --db ${APP_DATA}
|
||||||
|
|
|
@ -38,7 +38,6 @@ fn main() -> Result<(), Error> {
|
||||||
// get database directory from args
|
// get database directory from args
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
let db_dir: Option<String> = db_from_args(args);
|
let db_dir: Option<String> = db_from_args(args);
|
||||||
info!("Using database: {:?}", db_dir);
|
|
||||||
{
|
{
|
||||||
let mut settings = config::SETTINGS.write().unwrap();
|
let mut settings = config::SETTINGS.write().unwrap();
|
||||||
// replace default settings with those read from config.toml
|
// replace default settings with those read from config.toml
|
||||||
|
|
Loading…
Reference in New Issue
Block a user