diff --git a/Dockerfile b/Dockerfile index fd87a29..64dc518 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,5 +10,6 @@ RUN update-ca-certificates WORKDIR /usr/src/daedalus COPY . . RUN cargo build --release +COPY ./target/release/daedalus /usr/src/daedalus/daedalus -CMD ["cargo", "run", "--release"] \ No newline at end of file +CMD ["./daedalus"] \ No newline at end of file diff --git a/daedalus_client/src/main.rs b/daedalus_client/src/main.rs index 01ace2e..89387a6 100644 --- a/daedalus_client/src/main.rs +++ b/daedalus_client/src/main.rs @@ -298,6 +298,13 @@ pub async fn upload_static_files( use path_slash::PathExt as _; let cdn_upload_dir = dotenvy::var("CDN_UPLOAD_DIR").unwrap_or("./upload_cdn".to_string()); + + info!("uploading static files from {}", cdn_upload_dir); + + if !std::path::Path::new(&cdn_upload_dir).exists() { + panic!("CDN_UPLOAD_DIR does not exist"); + } + for entry in walkdir::WalkDir::new(&cdn_upload_dir) { let entry = entry?; if entry.path().is_file() { @@ -312,7 +319,7 @@ pub async fn upload_static_files( ) })?; info!( - "uploading {} to cnd at path {}", + "uploading {} to cdn at path {}", entry.path().display(), upload_path );