Fix dockerfile issue
This commit is contained in:
@@ -3,7 +3,7 @@ FROM rust:1-slim-bookworm AS builder
|
|||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
|
||||||
RUN apt-get update \
|
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/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY myfsio-engine ./myfsio-engine
|
COPY myfsio-engine ./myfsio-engine
|
||||||
@@ -25,7 +25,8 @@ RUN apt-get update \
|
|||||||
&& chown -R myfsio:myfsio /app
|
&& 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/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
|
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
|
||||||
|
|
||||||
RUN chmod +x /app/docker-entrypoint.sh \
|
RUN chmod +x /app/docker-entrypoint.sh \
|
||||||
@@ -34,9 +35,13 @@ RUN chmod +x /app/docker-entrypoint.sh \
|
|||||||
USER myfsio
|
USER myfsio
|
||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
EXPOSE 5100
|
||||||
ENV HOST=0.0.0.0 \
|
ENV HOST=0.0.0.0 \
|
||||||
PORT=5000 \
|
PORT=5000 \
|
||||||
|
UI_PORT=5100 \
|
||||||
STORAGE_ROOT=/app/data \
|
STORAGE_ROOT=/app/data \
|
||||||
|
TEMPLATES_DIR=/app/templates \
|
||||||
|
STATIC_DIR=/app/static \
|
||||||
RUST_LOG=info
|
RUST_LOG=info
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||||
|
|||||||
12
rust/myfsio-engine/Cargo.lock
generated
12
rust/myfsio-engine/Cargo.lock
generated
@@ -2630,7 +2630,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "myfsio-auth"
|
name = "myfsio-auth"
|
||||||
version = "0.5.0"
|
version = "0.4.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
"aes",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -2655,7 +2655,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "myfsio-common"
|
name = "myfsio-common"
|
||||||
version = "0.5.0"
|
version = "0.4.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -2666,7 +2666,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "myfsio-crypto"
|
name = "myfsio-crypto"
|
||||||
version = "0.5.0"
|
version = "0.4.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes-gcm",
|
"aes-gcm",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -2687,7 +2687,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "myfsio-server"
|
name = "myfsio-server"
|
||||||
version = "0.5.0"
|
version = "0.4.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes-gcm",
|
"aes-gcm",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -2738,7 +2738,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "myfsio-storage"
|
name = "myfsio-storage"
|
||||||
version = "0.5.0"
|
version = "0.4.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"dashmap",
|
"dashmap",
|
||||||
@@ -2761,7 +2761,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "myfsio-xml"
|
name = "myfsio-xml"
|
||||||
version = "0.5.0"
|
version = "0.4.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"myfsio-common",
|
"myfsio-common",
|
||||||
|
|||||||
@@ -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())
|
.and_then(|value| value.to_str().ok())
|
||||||
.map(|value| value.to_string());
|
.map(|value| value.to_string());
|
||||||
|
|
||||||
let response = if path == "/myfsio/health" || path == "/health" {
|
let response = if path == "/myfsio/health" {
|
||||||
next.run(req).await
|
next.run(req).await
|
||||||
} else if let Some(response) = maybe_serve_website(
|
} else if let Some(response) = maybe_serve_website(
|
||||||
&state,
|
&state,
|
||||||
@@ -488,7 +488,7 @@ async fn authorize_request(
|
|||||||
query: &str,
|
query: &str,
|
||||||
copy_source: Option<&str>,
|
copy_source: Option<&str>,
|
||||||
) -> Result<(), S3Error> {
|
) -> Result<(), S3Error> {
|
||||||
if path == "/myfsio/health" || path == "/health" {
|
if path == "/myfsio/health" {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
if path == "/" {
|
if path == "/" {
|
||||||
|
|||||||
Reference in New Issue
Block a user