{"id":25099559,"url":"https://github.com/ajmyyra/waitforit","last_synced_at":"2026-05-10T16:44:14.503Z","repository":{"id":96855859,"uuid":"145043502","full_name":"ajmyyra/waitforit","owner":"ajmyyra","description":"Wait-for-it.sh dockerised","archived":false,"fork":false,"pushed_at":"2018-08-19T20:44:24.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-12T20:54:40.572Z","etag":null,"topics":["docker-image"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajmyyra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2018-08-16T22:04:55.000Z","updated_at":"2019-03-25T07:59:38.000Z","dependencies_parsed_at":"2023-04-18T20:17:28.470Z","dependency_job_id":null,"html_url":"https://github.com/ajmyyra/waitforit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ajmyyra/waitforit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmyyra%2Fwaitforit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmyyra%2Fwaitforit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmyyra%2Fwaitforit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmyyra%2Fwaitforit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajmyyra","download_url":"https://codeload.github.com/ajmyyra/waitforit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajmyyra%2Fwaitforit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32864092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"ssl_error","status_checked_at":"2026-05-10T13:40:02.145Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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-image"],"created_at":"2025-02-07T19:22:01.435Z","updated_at":"2026-05-10T16:44:14.482Z","avatar_url":"https://github.com/ajmyyra.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Waitforit - Wait-for-it.sh dockerised\n\nThis is a dockerised version of [wait-for-it.sh script by Giles Hall](https://github.com/vishnubob/wait-for-it) to be used as initContainer for Kubernetes. \n\nThe script checks for specified host and TCP port to see if it's already up, and waits if it is not. \n\n# Why?\n\nWhen using ready-made containers, you can have Kubernetes restart the pod until the external service (a database, for example) is ready and the application runs, but a better way is to wait until dependencies are in place. This approach also works in a scenario of multiple dependencies where we need to wait for databases, load balancer, Kafka cluster or even networking to come up at the same time.\n\nIf you're building your own images, there's no need to have initContainers in place as your can just add the original [wait-for-it.sh](https://github.com/vishnubob/wait-for-it/blob/master/wait-for-it.sh) to your Dockerfile to be run before the application is started.\n\n# Dockerised version\n\nReady-built container is found in Docker Hub. You can run it simply with the following command:\n\n```\ndocker run --rm -e HOST=example.com -e PORT=80 -e TIMEOUT=15 ajmyyra/waitforit:1\n```\n\n# Usage as Kubernetes InitContainer\n\nLets assume you have a database-backed application that you want to start after the database itself is up. You can define waitforit as InitContainer for your pod, so it will run to check database status before the actual pod starts.\n\nAdd this before containers in your specfile:\n```\ninitContainers:\n- name: database-check\n  image: ajmyyra/waitforit:1\n  env:\n  - name: HOST\n    value: mysql-service\n  - name: PORT\n    value: '3306'\n```\n\nThis way Kubernetes waits before starting the real application until the database is up and responding. If you want to change the timeout from standard 120 seconds, just add it as the TIMEOUT variable in seconds.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajmyyra%2Fwaitforit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajmyyra%2Fwaitforit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajmyyra%2Fwaitforit/lists"}