Add Dockerfile

This commit is contained in:
Shav Kinderlehrer 2024-04-06 09:55:50 -04:00
parent 6c44d2eeab
commit c9dc4e5b8b
2 changed files with 8 additions and 2 deletions

6
Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM rust:1.76.0
WORKDIR /usr/src/chela
COPY . .
RUN cargo build -r
CMD ["./target/release/chela"]
EXPOSE 3000

View File

@ -57,8 +57,8 @@ async fn main() -> eyre::Result<()> {
sqids, sqids,
}; };
let address = std::env::var("LISTEN_ADDRESS").unwrap_or("0.0.0.0".to_string()); let address = "0.0.0.0";
let port = std::env::var("LISTEN_PORT").unwrap_or("3000".to_string()); let port = 3000;
let router = init_routes(server_state); let router = init_routes(server_state);
let listener = tokio::net::TcpListener::bind(format!("{address}:{port}")).await?; let listener = tokio::net::TcpListener::bind(format!("{address}:{port}")).await?;