Hi,
I'm running the tiredofit/zerotier Docker image with Docker Compose on Windows 10 using Docker Desktop with WSL2 backend.
I noticed that when I do docker-compose up -d, the zerotier-app container starts before the zerotier-db (PostgreSQL) service is fully ready, causing repeated connection errors like:
"[WARN] Postgres Host 'zerotier-db' is not accessible, retrying..."
This happens because Docker Compose's depends_on only waits for container start, not for service readiness.
To fix this, I suggest adding a healthcheck to the zerotier-db service (using pg_isready) and configuring depends_on.condition in the compose file, so that zerotier-app waits for the database to be healthy before starting.
This would improve startup reliability and reduce confusing log entries.
Thanks for your great work on this project!
Best regards
Hi,
I'm running the tiredofit/zerotier Docker image with Docker Compose on Windows 10 using Docker Desktop with WSL2 backend.
I noticed that when I do
docker-compose up -d, thezerotier-appcontainer starts before thezerotier-db(PostgreSQL) service is fully ready, causing repeated connection errors like:"[WARN] Postgres Host 'zerotier-db' is not accessible, retrying..."
This happens because Docker Compose's
depends_ononly waits for container start, not for service readiness.To fix this, I suggest adding a healthcheck to the
zerotier-dbservice (usingpg_isready) and configuringdepends_on.conditionin the compose file, so thatzerotier-appwaits for the database to be healthy before starting.This would improve startup reliability and reduce confusing log entries.
Thanks for your great work on this project!
Best regards