diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +/target diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6614f10 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM rust:1.75.0 + +WORKDIR /usr/src/chaospott-status +COPY . . +RUN cargo install --path . + +EXPOSE 3000 + +CMD ["chaospott-status"] \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 40cb67d..4fbd6f4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,8 @@ async fn main() { .route("/api/update.php", post(the_doors)); let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); + + println!("Start serving"); axum::serve(listener, app).await.unwrap(); }