Fix dockerfile issue

This commit is contained in:
2026-04-20 21:39:06 +08:00
parent 476b9bd2e4
commit 3e7c0af019
3 changed files with 15 additions and 10 deletions

View File

@@ -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 \

View File

@@ -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",

View File

@@ -328,7 +328,7 @@ pub async fn auth_layer(State(state): State<AppState>, 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 == "/" {