Skip to content

Commit

Permalink
add healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf committed Dec 11, 2023
1 parent 88aad4e commit 4d7dd5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/world-id-teleg
USER 100
EXPOSE 8000
CMD ["/app/world-id-telegram"]

HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost:8000/health || exit 1
1 change: 1 addition & 0 deletions src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub async fn start(bot: Bot, config: AppConfig, bot_data: User, join_requests: J
Redirect::permanent(&format!("https://t.me/{}", bot_data.username.unwrap()))
}),
)
.route("/health", get(|| async { "OK" }))
.route(
"/verify/:chat_id/:user_id",
get(verify_page).post(verify_api),
Expand Down

0 comments on commit 4d7dd5e

Please sign in to comment.