caddy fiilailuu

This commit is contained in:
2026-04-01 18:09:21 +03:00
parent db1033e9d2
commit cd1dd9a363
2 changed files with 2 additions and 1 deletions

View File

@@ -22,5 +22,6 @@ COPY --from=builder /app/target/release/hub /usr/local/bin/hub
COPY --from=builder /app/static /app/static COPY --from=builder /app/static /app/static
WORKDIR /app WORKDIR /app
ENV STATIC_DIR=/app/static
EXPOSE 3000 EXPOSE 3000
CMD ["hub"] CMD ["hub"]

View File

@@ -100,7 +100,7 @@ async fn main() {
}); });
let app = Router::new() let app = Router::new()
.nest_service("/", ServeDir::new("../static")) .nest_service("/", ServeDir::new(std::env::var("STATIC_DIR").unwrap_or_else(|_| "../static".to_string())))
.route("/ws", get(ws_handler)) .route("/ws", get(ws_handler))
.with_state(state); .with_state(state);