From 3e7c0af019dabbf0ed35dfe11089d3a6525598aa Mon Sep 17 00:00:00 2001 From: kqjy Date: Mon, 20 Apr 2026 21:39:06 +0800 Subject: [PATCH] Fix dockerfile issue --- rust/Dockerfile | 9 +++++++-- rust/myfsio-engine/Cargo.lock | 12 ++++++------ .../crates/myfsio-server/src/middleware/auth.rs | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/rust/Dockerfile b/rust/Dockerfile index b014dd8..ed52350 100644 --- a/rust/Dockerfile +++ b/rust/Dockerfile @@ -3,7 +3,7 @@ FROM rust:1-slim-bookworm AS builder WORKDIR /build RUN apt-get update \ - && apt-get install -y --no-install-recommends pkg-config libssl-dev \ + && apt-get install -y --no-install-recommends build-essential pkg-config libssl-dev \ && rm -rf /var/lib/apt/lists/* COPY myfsio-engine ./myfsio-engine @@ -25,7 +25,8 @@ RUN apt-get update \ && chown -R myfsio:myfsio /app COPY --from=builder /build/myfsio-engine/target/release/myfsio-server /usr/local/bin/myfsio-server -COPY --from=builder /build/myfsio-engine/templates /app/templates +COPY --from=builder /build/myfsio-engine/crates/myfsio-server/templates /app/templates +COPY --from=builder /build/myfsio-engine/crates/myfsio-server/static /app/static COPY docker-entrypoint.sh /app/docker-entrypoint.sh RUN chmod +x /app/docker-entrypoint.sh \ @@ -34,9 +35,13 @@ RUN chmod +x /app/docker-entrypoint.sh \ USER myfsio EXPOSE 5000 +EXPOSE 5100 ENV HOST=0.0.0.0 \ PORT=5000 \ + UI_PORT=5100 \ STORAGE_ROOT=/app/data \ + TEMPLATES_DIR=/app/templates \ + STATIC_DIR=/app/static \ RUST_LOG=info HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ diff --git a/rust/myfsio-engine/Cargo.lock b/rust/myfsio-engine/Cargo.lock index dd29eae..d8c061c 100644 --- a/rust/myfsio-engine/Cargo.lock +++ b/rust/myfsio-engine/Cargo.lock @@ -2630,7 +2630,7 @@ dependencies = [ [[package]] name = "myfsio-auth" -version = "0.5.0" +version = "0.4.3" dependencies = [ "aes", "base64", @@ -2655,7 +2655,7 @@ dependencies = [ [[package]] name = "myfsio-common" -version = "0.5.0" +version = "0.4.3" dependencies = [ "chrono", "serde", @@ -2666,7 +2666,7 @@ dependencies = [ [[package]] name = "myfsio-crypto" -version = "0.5.0" +version = "0.4.3" dependencies = [ "aes-gcm", "base64", @@ -2687,7 +2687,7 @@ dependencies = [ [[package]] name = "myfsio-server" -version = "0.5.0" +version = "0.4.3" dependencies = [ "aes-gcm", "async-trait", @@ -2738,7 +2738,7 @@ dependencies = [ [[package]] name = "myfsio-storage" -version = "0.5.0" +version = "0.4.3" dependencies = [ "chrono", "dashmap", @@ -2761,7 +2761,7 @@ dependencies = [ [[package]] name = "myfsio-xml" -version = "0.5.0" +version = "0.4.3" dependencies = [ "chrono", "myfsio-common", diff --git a/rust/myfsio-engine/crates/myfsio-server/src/middleware/auth.rs b/rust/myfsio-engine/crates/myfsio-server/src/middleware/auth.rs index db2283d..fe658bd 100644 --- a/rust/myfsio-engine/crates/myfsio-server/src/middleware/auth.rs +++ b/rust/myfsio-engine/crates/myfsio-server/src/middleware/auth.rs @@ -328,7 +328,7 @@ pub async fn auth_layer(State(state): State, mut req: Request, next: N .and_then(|value| value.to_str().ok()) .map(|value| value.to_string()); - let response = if path == "/myfsio/health" || path == "/health" { + let response = if path == "/myfsio/health" { next.run(req).await } else if let Some(response) = maybe_serve_website( &state, @@ -488,7 +488,7 @@ async fn authorize_request( query: &str, copy_source: Option<&str>, ) -> Result<(), S3Error> { - if path == "/myfsio/health" || path == "/health" { + if path == "/myfsio/health" { return Ok(()); } if path == "/" {