Skip to content

Add health-check for DB connectivity and HTTP/S status#19

Open
iconben wants to merge 1 commit intomainfrom
feature/16-add-db-healthcheck
Open

Add health-check for DB connectivity and HTTP/S status#19
iconben wants to merge 1 commit intomainfrom
feature/16-add-db-healthcheck

Conversation

@iconben
Copy link
Contributor

@iconben iconben commented Jan 20, 2026

Implements #16.

This PR adds a HEALTHCHECK instruction to the Dockerfile and a supporting healthcheck.sh script.

Features:

  • Database Check: Verifies connection to the database using credentials from wp-config.php. Returns exit code 2 on failure.
  • HTTP/S Status Check: Verifies that the web server is reachable via curl. Adapts to HTTPS_ENABLED and DOMAIN_NAME environment variables to handle custom domains and SSL correctly. Returns exit code 1 on failure.

Implements issue #16. Adds a healthcheck script that verifies database connectivity (exit code 2 on failure) and HTTP/S reachability (exit code 1 on failure). adapting to HTTPS_ENABLED and DOMAIN_NAME environment variables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant