Skip to content

Commit

Permalink
🐛 Fix TLS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
malted committed Jan 19, 2024
1 parent ba19fc8 commit 1ca5106
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
19 changes: 15 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ edition = "2021"
dotenv = "0.15.0"
env_logger = "0.11.0"
log = "0.4.20"
openssl = { version = "0.10.62", features = ["vendored"] }
parking_lot = "0.12.1"
reqwest = { version = "0.11.22", features = ["blocking", "json"] }
rocket = { version = "0.5.0", features = ["json"] }
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN cargo build --release
# Copy the binary into a new container for a smaller docker image
FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y libssl-dev
RUN apt-get update && apt-get install -y libssl-dev ca-certificates

COPY --from=build /tmp/team/target/release/team /

Expand Down
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ fn rocket() -> _ {
dotenv::dotenv().ok();
env_logger::init();

rocket::build()
let mut config = rocket::config::Config::release_default();
if !cfg!(debug_assertions) {
config.address = std::net::IpAddr::from([0, 0, 0, 0]);
}

rocket::custom(config)
.mount("/", routes![get_team, update_team])
.manage(RwLock::new(Team::fetch()))
}

0 comments on commit 1ca5106

Please sign in to comment.