{"id":20118514,"url":"https://github.com/arcanjoaq/wait-for","last_synced_at":"2026-04-13T19:32:20.254Z","repository":{"id":57497101,"uuid":"174327560","full_name":"arcanjoaq/wait-for","owner":"arcanjoaq","description":"Binary to wait for resources like databases and message brokers.","archived":false,"fork":false,"pushed_at":"2025-11-20T16:52:16.000Z","size":804,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-20T18:24:59.355Z","etag":null,"topics":["docker","docker-compose","docker-utility","golang","mongodb","mysql","postgres","rabbitmq","utility"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arcanjoaq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-03-07T10:59:48.000Z","updated_at":"2025-11-20T16:52:14.000Z","dependencies_parsed_at":"2024-02-23T02:23:12.784Z","dependency_job_id":"790f858a-3819-4393-9157-0ee33f095f16","html_url":"https://github.com/arcanjoaq/wait-for","commit_stats":null,"previous_names":["arcanjoqueiroz/wait-for"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/arcanjoaq/wait-for","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcanjoaq%2Fwait-for","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcanjoaq%2Fwait-for/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcanjoaq%2Fwait-for/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcanjoaq%2Fwait-for/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arcanjoaq","download_url":"https://codeload.github.com/arcanjoaq/wait-for/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arcanjoaq%2Fwait-for/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31768637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","docker-utility","golang","mongodb","mysql","postgres","rabbitmq","utility"],"created_at":"2024-11-13T19:11:21.775Z","updated_at":"2026-04-13T19:32:20.229Z","avatar_url":"https://github.com/arcanjoaq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wait-for\n\n_Wait-for_ is a binary used to wait for a resource (like a _database_ or a _message broker_) to be available. It supports _PostgreSQL_, _MySQL_, _MongoDB_ databases and _RabbitMQ_ message broker.\n\n## Installing\n\nHere is an example of _wait-for_ installation in a _Dockerfile_:\n\n```dockerfile\nENV WAIT_FOR_VERSION=v0.0.4\nRUN wget \"https://github.com/arcanjoaq/wait-for/releases/download/${WAIT_FOR_VERSION}/wait-for\" \u0026\u0026 chmod u+x wait-for\n  ```\n\n## Usage\n\nBasically, the option **--type** determines the target resource. Here are some examples of _wait-for_:\n\n### MySQL\n\n```sh\n./wait-for --type mysql \\\n           --host localhost \\\n           --port 3306 \\\n           --user root \\\n           --password mysql \\\n           --name mysql \\\n           --maxAttempts 100\n```\n\n### PostgreSQL\n\n```sh\n./wait-for --type postgres \\\n           --host localhost \\\n           --port 5432 \\\n           --user test \\\n           --password test \\\n           --name test \\\n           --maxAttempts 100\n```\n\n### MongoDB\n\n```sh\n./wait-for --type mongodb \\\n           --host localhost \\\n           --port 27017 \\\n           --user test \\\n           --password test \\\n           --name test \\\n           --maxAttempts 100\n```\n\n### RabbitMQ\n\n```sh\n./wait-for --type rabbitmq \\\n           --host localhost \\\n           --port 5672 \\\n           --user test \\\n           --password test \\\n           --name '/' \\\n           --maxAttempts 100\n```\n\n## Options\n\n**--type**: Set _resource type_.\n\n**--host**: Set _target host_. The default value is \"localhost\".\n\n**--port**: Set _resource port_. The default value depends on resource type.\n\n**--user**: Set _resource user_.\n\n**--password**: Set _resource password_.\n\n**--name**: Se _resource name_. It is _database name_ or _virtual host name_.\n\n**--seconds**: Set _number of seconds_ to wait for a resource. The default value is \"10\".\n\n**--maxAttempts**: Set _max attempts quantity_. The default value is \"3\".\n\n## Linting\n\n```sh\nmake lint\n```\n\n## Building\n\n```sh\nmake build\n```\n\n## Licensing\n\n[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcanjoaq%2Fwait-for","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcanjoaq%2Fwait-for","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcanjoaq%2Fwait-for/lists"}