{"id":17134387,"url":"https://github.com/brianium/docker.compose","last_synced_at":"2025-08-19T08:06:32.513Z","repository":{"id":146514909,"uuid":"439461460","full_name":"brianium/docker.compose","owner":"brianium","description":"docker compose for Clojure REPLs","archived":false,"fork":false,"pushed_at":"2021-12-17T21:28:34.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-16T06:00:23.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brianium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-12-17T21:13:05.000Z","updated_at":"2021-12-17T21:28:37.000Z","dependencies_parsed_at":"2023-06-07T13:00:42.764Z","dependency_job_id":null,"html_url":"https://github.com/brianium/docker.compose","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brianium/docker.compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fdocker.compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fdocker.compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fdocker.compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fdocker.compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianium","download_url":"https://codeload.github.com/brianium/docker.compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fdocker.compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271121168,"owners_count":24702723,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-14T19:44:45.705Z","updated_at":"2025-08-19T08:06:32.506Z","avatar_url":"https://github.com/brianium.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker.compose\n\n[![Clojars Project](https://img.shields.io/clojars/v/com.github.brianium/docker.compose.svg)](https://clojars.org/com.github.brianium/docker.compose)\n\n\n\u003e I just want to run docker compose from the repl y'all\n\nJust a simple utility for running (and waiting for the availability of) services\nvia [docker compose](https://docs.docker.com/compose/) via the REPL.\n\n## Rationale\n\n`docker compose` is a useful tool for running infrastructure services used during development - something like a database. I don't want to leave the REPL to start or stop these services. It is also handy to include containers as dependencies of a system built with something like [integrant](https://github.com/weavejester/integrant).\n\n## Usage\n\n**compose-up and compose-down**\n\nThe simplest functions just run `docker compose up -d` and `docker compose down` for us:\n\n```clojure\n(ns dev\n  (:require [docker.compose :as docker]))\n\n(docker/compose-up) ;;; use the docker-compose.yml in the same dir as deps.edn\n\n(docker/compose-down) ;;; tear it all down\n```\n\n**wait-for-container and wait-for-port**\n\nThese functions are useful for making sure a service is ready. It can also allow you to effectively\nspecify running services from docker as dependencies in a system created by something like integrant:\n\n```clojure\n(defmethod ig/init-key ::containers [_ _]\n  (info \"Starting containers...\")\n  (docker/compose-up)\n  (when-not (and (docker/wait-for-container \"my_database\") (docker/wait-for-port 3360))\n    (throw (ex-info \"Failed to wait for container\" {:container \"my_database\"}))))\n```\n\nHere we are waiting for both the container AND port in order to have a degree of confidence\nthat our database is ready for use.\n\n`wait-for-container` and `wait-for-port` support optional arguments to control the interval at which they are checked and the timeout desired.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Fdocker.compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianium%2Fdocker.compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Fdocker.compose/lists"}