Skip to content

Commit

Permalink
fix: Dockerfile and retry timout
Browse files Browse the repository at this point in the history
  • Loading branch information
Threated committed Apr 15, 2024
1 parent 6fff147 commit 5b93924
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY . .
RUN cargo build --release --bin local

FROM gcr.io/distroless/cc-debian12:debug AS runtime
COPY --from=proxy /usr/local/bin/beam /usr/local/bin/proxy
COPY --from=proxy /usr/local/bin/beam-proxy /usr/local/bin/proxy
COPY --from=builder /app/target/release/local /usr/local/bin/

ENV APP_secret-sync_KEY=NotSecret
Expand Down
4 changes: 2 additions & 2 deletions local/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async fn send_secret_request(
}

async fn wait_for_beam_proxy() -> beam_lib::Result<()> {
const MAX_RETRIRES: u8 = 10;
const MAX_RETRIRES: u8 = 15;
let mut tries = 1;
loop {
match reqwest::get(format!("{BEAM_PROXY_URL}/v1/health")).await {
Expand All @@ -150,7 +150,7 @@ async fn wait_for_beam_proxy() -> beam_lib::Result<()> {
format!("Proxy reachable but failed to start {}", res.status()).into(),
))
}
}
};
tokio::time::sleep(Duration::from_secs(1)).await;
}
}

0 comments on commit 5b93924

Please sign in to comment.