Skip to content

zerotier-app starts before zerotier-db is ready, causing database connection errors #1

@DeepseaGoldenFlow

Description

@DeepseaGoldenFlow

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions