{"id":16323477,"url":"https://github.com/you54f/getpact","last_synced_at":"2026-04-20T10:32:18.618Z","repository":{"id":66228840,"uuid":"560112642","full_name":"YOU54F/getpact","owner":"YOU54F","description":"Pact 🔗 Contract Testing - Quick Start Helper Script","archived":false,"fork":false,"pushed_at":"2023-05-17T21:32:53.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-16T23:54:07.874Z","etag":null,"topics":["contract-testing","docker","pact","pact-broker","pactflow","postgresql","testing"],"latest_commit_sha":null,"homepage":"https://pact.saf.dev","language":"Shell","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/YOU54F.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":"2022-10-31T19:04:38.000Z","updated_at":"2023-05-03T15:33:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ee0481d-5d04-4d0c-aed7-f6d847e8087c","html_url":"https://github.com/YOU54F/getpact","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YOU54F/getpact","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YOU54F%2Fgetpact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YOU54F%2Fgetpact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YOU54F%2Fgetpact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YOU54F%2Fgetpact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YOU54F","download_url":"https://codeload.github.com/YOU54F/getpact/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YOU54F%2Fgetpact/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32043015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["contract-testing","docker","pact","pact-broker","pactflow","postgresql","testing"],"created_at":"2024-10-10T22:54:55.678Z","updated_at":"2026-04-20T10:32:18.601Z","avatar_url":"https://github.com/YOU54F.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Get Pact\n\nGet Pact is a helper for Pact.io to get you started\n\nYou can run it directly from the Interwebs\n\n`curl pact.saf.dev -Lso - | bash -s -- help`\n\nThe source is [here](https://gist.github.com/YOU54F/642ee8f54f1da813b0ee6e2a29628016) \n\nI set it up like the following in my `.zshrc` file\n\n```sh\nalias getpact_run=\"curl pact.saf.dev -Lso - | bash -s -- help\"\nalias getpact_dl=\"curl pact.saf.dev -Ls -o\"\ngetpact_location=\"/Users/saf/dev/you54f/getpact/getpact\"\ngetpact () {\n  first_arg=\"$1\"\n  shift\n  $getpact_location ${first_arg:-'help'} $@\n}\n\n\n```\n\n## Options\n\n```sh\n______________________\n  Get Pact\n______________________\n  Available Commands \n______________________\ngetpact help\ngetpact broker\ngetpact broker list\ngetpact broker deploy \u003ctenant_name\u003e \u003cport\u003e\ngetpact broker stop \u003ctenant_name\u003e\ngetpact broker remove \u003ctenant_name\u003e\ngetpact broker backup \u003ctenant_name\u003e\ngetpact broker restore \u003ctenant_name\u003e\ngetpact broker restore \u003ctenant_name\u003e\ngetpact doctor\ngetpact doctor-env\ngetpact install-cli\ngetpact install-cli ruby\ngetpact install-cli docker\ngetpact install-cli standalone\n______________________\n\n```\n\n## Broker on demand\n\nPact Broker SafS is a Pact contract file middleware service that supports multi-tenancy.\n\nI would recommend [Pactflow](https://pactflow.io/) if you are looking for a secure Hosted SaaS platform, this offers a really neat way to spin up and backup local brokers for testing purposes.\n\nThis is **NOT** suitable for production, and doesn't offer enterprise grade features such as OAuth login mechanisms.\n\nWith thanks to the original author\n\n\u003e **Source**: https://github.com/tongzh/pact-broker-saas\n\n\n### characteristic\n\n#### multi-tenancy\n\nPhysical multi-tenancy is achieved through container isolation. Pull up PactBroker and dependent postgresql database services for each tenant through docker-compose, and the services of each tenant are distinguished by ports.\n\n\n### Operation and maintenance\n\n\n#### Add tenant\n\n\nWhen selecting a port number for a new tenant, it should avoid conflict with the existing port number. You can `docker ps | grep pact_broker` view the occupied port number by running commands.\n\nAdd tenant run command\n\n`getpact deploy \u003ctenant_name\u003e \u003ctenant_port\u003e`\n\nFor example, for a new tenant named tenant serving on port 12999, run the following command:\n\n`getpact deploy tenant 12999`\n\nThe corresponding pact_broker container and pact_db container can be created, and the service can be accessed through port 12999.\n\n#### Stop the tenant container from running\n\nStop the tenant containers (including the two containers pact_broker and pact_db) and run the command:\n\n\n`getpact stop \u003ctenant_name\u003e`\n\nFor example, to stop the tenant's container, run the following command:\n\n\n`getpact stop tenant`\n\n#### Delete tenant containers and data volumes\n\nDelete the stopped tenant containers (including the two containers pact_broker and pact_db), delete the data volume, and run the command:\n\n`getpact remove \u003ctenant_name\u003e`\n\nFor example, to delete the container and data volume of the tenant, run the following command:\n\n`getpact remove tenant`\n\n#### Backup tenant data\n\nBack up the tenant data to a file in the current folder `\u003ctenant_name\u003e-data.tar`, run the command:\n\n`getpact backup \u003ctenant_name\u003e`\n\nFor example, to back up the tenant's data, run the following command:\n\n`getpact backup tenant`\n\nThe tenant's database data will be backed up to files in the current folder `tenant-data.tar`.\n\n#### Restoring tenant data\n\nFirst prepare the data source file in the current directory, the file name must be in the `\u003ctenant_name\u003e-data.tar` form, run the command:\n\n`getpact restore \u003ctenant_name\u003e`\n\nFor example, to restore the tenant's data, run the following command:\n\n`getpact restore tenant`\n\nThe tenant data will be restored from the files in the current folder `tenant-data.tar`, and the postgresql container will be restarted (due to the mechanism of postgresql itself, the container must be restarted to read the restored data).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyou54f%2Fgetpact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyou54f%2Fgetpact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyou54f%2Fgetpact/lists"}