Self solve documented.
Under wireguard service
healthcheck:
test: [“CMD”, “curl”, “-f”, “https://ifconfig.me”]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
Under dependent containter.
healthcheck:
test: ["CMD", "curl", "-f", "https://ifconfig.me"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s