#!/bin/sh # Healthy when the application answers /up: over HTTP on port 80, or over HTTPS for SERVER_NAME when # AUTO_HTTPS is on (port 80 then only redirects). The certificate is not checked, so a container # still waiting for Let's Encrypt is judged by the application, not by its certificate. if [ "${AUTO_HTTPS:-false}" = "true" ]; then exec curl --silent --fail --insecure --resolve "$SERVER_NAME:443:127.0.0.1" "https://$SERVER_NAME/up" fi exec curl --silent --fail http://localhost/up