Run docker ps and NPM never says healthy or unhealthy. That is no bug. The image ships without a HEALTHCHECK.
The docs give an opt-in version for your compose file:
healthcheck:
test: ["CMD", "/usr/bin/check-health"]
interval: 10s
timeout: 3s
The script /usr/bin/check-health is inside the image already. After a recreate, docker ps shows (healthy) next to the container once the check passes, and other tools that watch container health have something to read.
A monitoring tool or a restart policy that depends on health has nothing to go on without it. Docker restarts a container that exits, but not one that is up and broken, and it does nothing about an unhealthy one on its own, so pair the check with whatever alerts you. Caveat: ten seconds is the docs’ value. If your box is slow at boot, you may see a short unhealthy period right after a restart, which is normal.
Docker only reports the state. Acting on it takes a separate tool or an alert.
Further reading: Nginx Proxy Manager: Advanced Configuration, On this site: pin the Nginx Proxy Manager image version, upgrade on purpose, On this site: DISABLE_IPV6 fixes the "Address family not supported" error in Nginx Proxy Manager, On this site: Guide: put Nextcloud behind Nginx Proxy Manager with HTTPS and the right headers
Going deeper: Guide: fix a 502 Bad Gateway in Nginx Proxy Manager, with a checklist that finds the cause