mirror of
https://github.com/Xevion/dynamic-preauth.git
synced 2026-01-31 04:24:10 -06:00
Just use static 5800 port
This commit is contained in:
+1
-2
@@ -26,11 +26,10 @@ RUN cargo build --release
|
|||||||
# Run the server application
|
# Run the server application
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
ARG PORT=5800
|
|
||||||
EXPOSE ${PORT}
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=builder-demo /build/demo/target/release/demo ./demo
|
COPY --from=builder-demo /build/demo/target/release/demo ./demo
|
||||||
COPY --from=builder-server /build/server/target/release/dynamic-preauth ./dynamic-preauth
|
COPY --from=builder-server /build/server/target/release/dynamic-preauth ./dynamic-preauth
|
||||||
|
|
||||||
|
EXPOSE 5800
|
||||||
CMD ["/app/dynamic-preauth"]
|
CMD ["/app/dynamic-preauth"]
|
||||||
+2
-2
@@ -7,8 +7,8 @@ async fn hello() -> &'static str {
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
let port = std::env::var("PORT").unwrap_or_else(|_| "5800".to_string());
|
// let port = std::env::var("PORT").unwrap_or_else(|_| "5800".to_string());
|
||||||
let addr = format!("127.0.0.1:{}", port);
|
let addr = format!("0.0.0.0:{}", "5800");
|
||||||
tracing_subscriber::fmt().init();
|
tracing_subscriber::fmt().init();
|
||||||
|
|
||||||
let router = Router::new().get(hello);
|
let router = Router::new().get(hello);
|
||||||
|
|||||||
Reference in New Issue
Block a user