caddy fiilailuu
This commit is contained in:
@@ -22,5 +22,6 @@ COPY --from=builder /app/target/release/hub /usr/local/bin/hub
|
||||
COPY --from=builder /app/static /app/static
|
||||
|
||||
WORKDIR /app
|
||||
ENV STATIC_DIR=/app/static
|
||||
EXPOSE 3000
|
||||
CMD ["hub"]
|
||||
|
||||
@@ -100,7 +100,7 @@ async fn main() {
|
||||
});
|
||||
|
||||
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))
|
||||
.with_state(state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user