{"id":23705708,"url":"https://github.com/ccakes/patroni-proxy","last_synced_at":"2026-02-18T20:31:13.659Z","repository":{"id":81268896,"uuid":"177310639","full_name":"ccakes/patroni-proxy","owner":"ccakes","description":"Simple proxy container for Patroni/Postgres","archived":false,"fork":false,"pushed_at":"2019-03-23T16:09:28.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T04:00:57.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccakes.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,"zenodo":null}},"created_at":"2019-03-23T16:08:59.000Z","updated_at":"2019-03-23T16:09:29.000Z","dependencies_parsed_at":"2023-05-24T08:00:12.916Z","dependency_job_id":null,"html_url":"https://github.com/ccakes/patroni-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ccakes/patroni-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccakes%2Fpatroni-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccakes%2Fpatroni-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccakes%2Fpatroni-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccakes%2Fpatroni-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccakes","download_url":"https://codeload.github.com/ccakes/patroni-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccakes%2Fpatroni-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29594258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T18:54:29.675Z","status":"ssl_error","status_checked_at":"2026-02-18T18:50:50.517Z","response_time":162,"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":[],"created_at":"2024-12-30T14:56:50.999Z","updated_at":"2026-02-18T20:31:13.530Z","avatar_url":"https://github.com/ccakes.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# patroni-proxy\n\nSimple proxy for a Consul-based [Patroni](https://github.com/zalando/patroni) deployment using [gobetween](https://github.com/yyyar/gobetween) as the proxy.\n\n#### Why gobetween?\n\nI run Patroni in [Nomad](https://nomadporject.io) and register my Postgres containers in Consul with two services, one for the Postgres listener and one for the Patroni API listener. gobetween makes it simple to use the SRV record for the Postgres port as the target, but health check the API service using a script.\n\nThe provided pg-check script uses the Patroni API to make sure the master and replica instances are available on the right ports.\n\n## Usage\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample Nomad config\u003c/summary\u003e\n\n```\ntask \"patroni\" {\n  driver = \"docker\"\n\n  template {\n    source      = \"/path/to/patroni.yml\"\n    destination = \"secrets/patroni.yml\"\n  }\n\n  config {\n    image = \"ccakes/nomad-pgsql-patroni:10.5-1\"\n\n    port_map {\n      pg  = \"$${NOMAD_PORT_pg}\"\n      api = \"$${NOMAD_PORT_api}\"\n    }\n  }\n\n  service {\n    name = \"postgres\"\n    port = \"pg\"\n\n    check {\n      type     = \"tcp\"\n      port     = \"pg\"\n      interval = \"10s\"\n      timeout  = \"2s\"\n    }\n  }\n\n  service {\n    name = \"patroni-api\"\n    port = \"api\"\n  }\n\n  resources {\n    memory = 2048\n\n    network {\n      port \"api\" {}\n      port \"pg\" {}\n    }\n  }\n}\n```\n\n\u003c/details\u003e\n\nJust run the Docker container and set `PATRONI_API` to the SRV record for the API service.\n\n```\ndocker run -d --name postgres-proxy \\\n  -p 5432:5432 -p 5433:5433 \\\n  -e PATRONI_API=_patroni-api._tcp.service.consul \\\n  -v /path/to/example.toml:/etc/gobetween.toml \\\n  ccakes/patroni-proxy\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccakes%2Fpatroni-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccakes%2Fpatroni-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccakes%2Fpatroni-proxy/lists"}