Skip to content

Commit

Permalink
Internal healthcheck endpoint + added wget dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
legendofa committed May 1, 2024
1 parent 4597949 commit e397abb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions base-dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /misarch-review/recipe.json recipe.json

RUN apt update && apt install -y wget && rm -rf /var/lib/apt/lists/

# Build dependencies - this is the caching Docker layer!
RUN cargo chef cook --release --recipe-path recipe.json
# Build application
Expand All @@ -20,6 +22,8 @@ RUN cargo build --release --bin misarch-review
# We do not need the Rust toolchain to run the binary!
FROM debian:bookworm-slim AS runtime

RUN apt update && apt install -y wget && rm -rf /var/lib/apt/lists/

WORKDIR /misarch-review
COPY --from=builder /misarch-review/target/release/misarch-review /usr/local/bin
ENTRYPOINT ["/usr/local/bin/misarch-review"]
2 changes: 2 additions & 0 deletions dev-dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM rust:1.75-slim-bookworm

RUN apt update && apt install -y wget && rm -rf /var/lib/apt/lists/

WORKDIR /usr/src/misarch-review

COPY . .
Expand Down
2 changes: 2 additions & 0 deletions devcontainer-dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM rust:1.75-slim-bookworm

RUN apt update && apt install -y wget && rm -rf /var/lib/apt/lists/

WORKDIR /usr/src/misarch-review
2 changes: 1 addition & 1 deletion docker-compose-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
context: .
dockerfile: base-dockerfile
healthcheck:
test: wget http://localhost:8080/graphiql || exit 1
test: wget -qO - http://localhost:8080/health || exit 1
interval: 1s
timeout: 10s
retries: 20
Expand Down

0 comments on commit e397abb

Please sign in to comment.