Automatic health checks

When deploying apps via docker compose, sometimes, health checks are included in the definition of the services, but that is not always guaranteed.
Today, we've added automatic health check functionality to DollarDeploy to give you confidence that your applications are running properly after deployment. This feature automatically verifies your app is responding correctly before marking the deployment as successful.
How It Works
After your application starts, DollarDeploy automatically performs HTTP health checks against your app to ensure it's responding properly. The system uses an exponential backoff strategy, starting with quick checks and gradually increasing the delay between attempts if your app isn't ready yet.
The health check process:
- Makes HTTP requests to your specified health check endpoint
- Waits for successful HTTP response codes (200, 204, 301, 302 by default)
- Retries with exponential backoff if the app isn't ready
- Times out after a configurable period if the app doesn't become healthy
Configuration Options
You can customize the health check behavior using these environment variables, defined in the app settings:
APP_HEALTHCHECK_ENABLE
Default: 1
Enable or disable health checks entirely. Set to 0
to skip health checks after deployment.
APP_READY_TIMEOUT
Default: 300
(5 minutes)
Maximum time in seconds to wait for your app to pass health checks before timing out.
APP_HEALTHCHECK_PATH
Default: /
The HTTP path to check for health status. Many applications expose dedicated health endpoints.
APP_HEALTHCHECK_SUCCESS_CODE
Default: 200, 204, 301, 302
Specify additional HTTP status codes that should be considered successful. The default codes are always accepted. For example 404 if your app works but does not have a / page.
Example Usage
For a typical web application with a dedicated health endpoint define this in the app environment variables:
APP_HEALTHCHECK_PATH=/api/health
APP_READY_TIMEOUT=180
To disable health checks for development or testing:
APP_HEALTHCHECK_ENABLE=0
Benefits
- Deployment Reliability: Catch deployment issues early before they affect users
- Automatic Retry Logic: Built-in exponential backoff handles apps that need time to initialize
- Flexible Configuration: Customize timeouts and endpoints for your specific application needs
- Clear Feedback: Get immediate visibility into whether your deployment was successful
The health check feature is enabled by default and works out of the box for most applications. For apps with custom health endpoints or longer startup times, simply adjust the configuration variables to match your needs.