{"id":22433040,"url":"https://github.com/roerohan/wait-for-it","last_synced_at":"2025-08-01T12:33:52.857Z","repository":{"id":43753599,"uuid":"314196534","full_name":"roerohan/wait-for-it","owner":"roerohan","description":"A Golang package to wait on the availability of a TCP host and port. This package generates a binary executable for https://github.com/vishnubob/wait-for-it.","archived":false,"fork":false,"pushed_at":"2024-05-21T14:08:31.000Z","size":234,"stargazers_count":32,"open_issues_count":3,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-19T10:15:33.457Z","etag":null,"topics":["golang","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roerohan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2020-11-19T09:21:18.000Z","updated_at":"2024-04-01T09:00:30.000Z","dependencies_parsed_at":"2024-06-19T10:01:06.690Z","dependency_job_id":"6a42873c-c2b7-4758-b792-ae73f5bc9537","html_url":"https://github.com/roerohan/wait-for-it","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":"roerohan/Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roerohan%2Fwait-for-it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roerohan%2Fwait-for-it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roerohan%2Fwait-for-it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roerohan%2Fwait-for-it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roerohan","download_url":"https://codeload.github.com/roerohan/wait-for-it/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228377561,"owners_count":17910449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["golang","hacktoberfest"],"created_at":"2024-12-05T22:13:43.782Z","updated_at":"2024-12-05T22:13:44.421Z","avatar_url":"https://github.com/roerohan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Issues][issues-shield]][issues-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003c!-- \u003ca href=\"https://github.com/roerohan/wait-for-it\"\u003e\n    \u003cimg src=\"https://project-logo.png\" alt=\"Logo\" width=\"80\"\u003e\n  \u003c/a\u003e --\u003e\n\n  \u003ch1 align=\"center\"\u003ewait-for-it\u003c/h1\u003e\n\n  \u003cp align=\"center\"\u003e\n    A Golang package to wait on the availability of a TCP host and port. \n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/roerohan/wait-for-it\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/roerohan/wait-for-it\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/roerohan/wait-for-it/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/roerohan/wait-for-it/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n## Table of Contents\n\n* [About the Project](#about-the-project)\n  * [Built With](#built-with)\n* [Getting Started](#getting-started)\n  * [Prerequisites](#prerequisites)\n  * [Installation](#installation)\n* [Usage](#usage)\n* [Roadmap](#roadmap)\n* [Contributing](#contributing)\n* [License](#license)\n* [Contributors](#contributors-)\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\n\u003cimg src=\"./assets/wait-for-it.png\" alt=\"wait-for-it\" width=\"800\"\u003e\n\nThis package is adapted from [vishnubob/wait-for-it](https://github.com/vishnubob/wait-for-it), a popular project used to wait for TCP connections until a service is up. This is commonly used in `docker-compose` files to make one service wait for another, for example, to make a web server wait for a `mysql` database.\n\nSince [vishnubob/wait-for-it](https://github.com/vishnubob/wait-for-it) is a bash script, it does not work directly with minimal containers like [scratch](https://hub.docker.com/_/scratch), which are commonly used to run binaries.\n\nWith the help of this package, you can generate a binary, which can run inside minimal Docker containers and wait for a TCP connection such as a `mysql` database. You can find an example here: [csivitu/bl0b](https://github.com/csivitu/bl0b/blob/master/docker-compose.yml).\n\n\n### Built With\n\n* [Go](https://golang.org/)\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nA `amd64` (64-bit) executables for `linux`, `darwin`, and `windows` are available in the [GitHub releases](https://github.com/roerohan/wait-for-it/releases/).\n\nIf you want to build a binary for a different Operating System / Architecture, you can follow the procedure below.\n\n### Prerequisites\n\nThe only prerequisite is `golang` which you can get [here](https://golang.org/).\n\n* go\n\n### Installation\n \n1. Get the package using `go install`.\n```bash\ngo install github.com/roerohan/wait-for-it\n```\n\nAlternatively, you can follow these steps:\n\n1. Clone the repository.\n```bash\ngit clone https://github.com/roerohan/wait-for-it\n```\n\n2. Build a go binary from source.\n```bash\ncd wait-for-it\ngo build -o ./bin/wait-for-it\n```\n\n3. Use the binary inside the bin folder.\n```bash\n./bin/wait-for-it google.com:80 -- echo \"It works\\!\"\n```\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nThe usage is similar to [vishnubob/wait-for-it](https://github.com/vishnubob/wait-for-it).\n\nUse `wait-for-it -h` to display the following list.\n\n```\nUsage of wait-for-it:\n  -q    Quiet, don't output any status messages\n  -s    Only execute subcommand if the test succeeds\n  -t int\n        Timeout in seconds, zero for no timeout (default 15)\n  -w host:port\n        Services to be waiting for, in the form host:port\n```\n\nYou can run any executable after passing ` -- `, like in the examples below.\n\n### Examples:\n\n1. Waiting for multiple services in parallel.\n\n```sh\nwait-for-it -w google.com:80 -w localhost:27017 -t 30 -- echo \"Waiting for 30 seconds for google.com:80 and localhost:27017\"\n```\n\n2. Strict mode will not execute the subcommand only if TCP connection was successful.\n\n```sh\n$ wait-for-it -w abcd:80 -s -t 5 -- echo \"Done\\!\"\nwait-for-it: waiting 5 seconds for abcd:80\nwait-for-it: timeout occured after waiting for 5 seconds\nwait-for-it: strict mode, refusing to execute subprocess\n```\n\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\nSee the [open issues](https://github.com/roerohan/wait-for-it/issues) for a list of proposed features (and known issues).\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'feat: Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nYou are requested to follow the contribution guidelines specified in [CONTRIBUTING.md](./CONTRIBUTING.md) while contributing to the project :smile:.\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See [`LICENSE`](./LICENSE) for more information.\n\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[roerohan-url]: https://roerohan.github.io\n[issues-shield]: https://img.shields.io/github/issues/roerohan/wait-for-it.svg?style=flat-square\n[issues-url]: https://github.com/roerohan/wait-for-it/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froerohan%2Fwait-for-it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froerohan%2Fwait-for-it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froerohan%2Fwait-for-it/lists"}