{"id":23380785,"url":"https://github.com/softonic/compose-project-is-up","last_synced_at":"2026-04-26T23:31:16.697Z","repository":{"id":66182981,"uuid":"91359657","full_name":"softonic/compose-project-is-up","owner":"softonic","description":"Waits until a compose project is running, with a defined timeout","archived":false,"fork":false,"pushed_at":"2020-01-27T16:26:37.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-08T07:43:56.994Z","etag":null,"topics":["docker-image"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/softonic/compose-project-is-up/","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/softonic.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}},"created_at":"2017-05-15T16:24:25.000Z","updated_at":"2020-01-27T15:43:55.000Z","dependencies_parsed_at":"2023-02-23T01:15:35.202Z","dependency_job_id":null,"html_url":"https://github.com/softonic/compose-project-is-up","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/softonic/compose-project-is-up","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fcompose-project-is-up","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fcompose-project-is-up/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fcompose-project-is-up/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fcompose-project-is-up/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softonic","download_url":"https://codeload.github.com/softonic/compose-project-is-up/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fcompose-project-is-up/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"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-image"],"created_at":"2024-12-21T20:18:35.062Z","updated_at":"2026-04-26T23:31:16.680Z","avatar_url":"https://github.com/softonic.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# softonic/compose-project-is-up\n\nWaits until a compose project is running, with a defined timeout.\n\n## Description\n\nThis image can be useful in the case you have a CI/CD pipeline and you want to be sure that\nyour containers are running and ready to receive commands before launch your tests.\n\nFor example, imagine you want to execute some integration tests in your image. You could do something like:\n\n``` bash\ndocker-compose up -d\ndocker-compose exec my-container /test-everyting\ndocker-compose down\n```\n\nBut who can be sure that when you launch the `docker-compose exec` command all the containers are ready?\nYou could add an `sleep XXX` command before the test execution, but this is not so precise and could\nrepresent a waste of time in your pipeline execution.\n\nIf you add the execution of this image before the tests execution you can make the pipe wait just the needed\ntime that your containers need to initialize.\n\nThe same example with the usage of this image could be:\n\n``` bash\ndocker-compose up -d\ndocker run --rm \\\n  -v ${PWD}/.:/project:ro \\\n  -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n  -e TIMEOUT=30 \\\n  -e COMPOSE_PROJECT_NAME=$(basename \"$PWD\") \\\n  -e EXPECTED_CONTAINERS=3 \\\n  softonic/compose-project-is-up\ndocker-compose exec my-container /test-everyting\ndocker-compose down\n```\n\n## Build\n\n``` bash\ndocker build -t softonic/compose-project-is-up .\n```\n\n## Usage\n\n``` bash\ndocker run --rm \\\n  -v ${PWD}/.:/project:ro \\\n  -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n  -e TIMEOUT=30 \\\n  -e COMPOSE_PROJECT_NAME=$(basename \"$PWD\") \\\n  -e EXPECTED_CONTAINERS=3 \\\n  softonic/compose-project-is-up\n```\n\nThis will assume that in less of 30 seconds there should be 3 containers running.\nIt's important to bypass the `COMPOSE_PROJECT_NAME` because it's how docker-compose identifies\nto which project the containers running in the host belong to the current project.\n\nYou need to mount two volumes:\n\n- `${PWD}`: Is your current folder and it allows to image to get the compose files definition.\n- `/var/run/docker.sock`: This allows to the image to get the data of the running containers.\n\n### Parameters\n\n- `TIMEOUT`: Max number of seconds before assuming that something gone wrong\n- `COMPOSE_PROJECT_NAME`: Project name, recommended value: $(basename \"$PWD\")\n- `EXPECTED_CONTAINERS`: Number of expected containers running.\n- `COMPOSE_FILE`: Compose file to read. Defaults to none.\n- `VERBOSE`: Output container name if activated (1 for active, 0 for disabled. Defaults to 0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftonic%2Fcompose-project-is-up","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftonic%2Fcompose-project-is-up","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftonic%2Fcompose-project-is-up/lists"}