{"id":20632465,"url":"https://github.com/citusdata/docker","last_synced_at":"2025-07-15T09:08:13.447Z","repository":{"id":6063419,"uuid":"52987383","full_name":"citusdata/docker","owner":"citusdata","description":":ship: Docker images and configuration for Citus","archived":false,"fork":false,"pushed_at":"2025-06-02T12:59:21.000Z","size":451,"stargazers_count":256,"open_issues_count":41,"forks_count":102,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-06-03T01:38:26.955Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citusdata.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-03-02T18:46:19.000Z","updated_at":"2025-06-02T12:59:23.000Z","dependencies_parsed_at":"2023-11-14T07:26:15.860Z","dependency_job_id":"d36c6011-6b64-458b-bc04-5af308217bf7","html_url":"https://github.com/citusdata/docker","commit_stats":{"total_commits":199,"total_committers":19,"mean_commits":"10.473684210526315","dds":0.7688442211055276,"last_synced_commit":"90bb3c644074880757a414f183ead3d515fa8881"},"previous_names":[],"tags_count":102,"template":false,"template_full_name":null,"purl":"pkg:github/citusdata/docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citusdata","download_url":"https://codeload.github.com/citusdata/docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fdocker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265424391,"owners_count":23762880,"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","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-11-16T14:16:17.243Z","updated_at":"2025-07-15T09:08:13.420Z","avatar_url":"https://github.com/citusdata.png","language":"Dockerfile","readme":"# Citus\n\n[![Image Size](https://images.microbadger.com/badges/image/citusdata/citus.svg)][image size]\n[![Release](https://img.shields.io/github/release/citusdata/docker.svg)][release]\n[![License](https://img.shields.io/github/license/citusdata/docker.svg)][license]\n\nCitus is a PostgreSQL-based distributed RDBMS. For more information, see the [Citus Data website][citus data].\n\n## Function\n\nThis image provides a single running Citus instance (atop PostgreSQL 12.2), using standard configuration values. It is based on [the official PostgreSQL image][docker-postgres], so be sure to consult that image’s documentation for advanced configuration options (including non-default settings for e.g. `PGDATA` or `POSTGRES_USER`).\n\nJust like the standard PostgreSQL image, this image exposes port `5432`. In other words, all containers on the same Docker network should be able to connect on this port, and exposing it externally will permit connections from external clients (`psql`, adapters, applications).\n\n## Usage\n\nSince Citus is intended for use within a cluster, there are many ways to deploy it. This repository provides configuration to permit two kinds of deployment: local (standalone) or local (with workers).\n\n### Standalone Use\n\nIf you just want to run a single Citus instance, it’s pretty easy to get started:\n\n```bash\ndocker run --name citus_standalone -p 5432:5432 -e POSTGRES_PASSWORD=\u003cpostgres_password\u003e citusdata/citus\n```\n\nYou should change '\u003cpostgres_password\u003e' with a password you want. You should now be able to connect to `127.0.0.1` on port `5432` using e.g. `psql` to run a few commands (see the Citus documentation for more information).\n\n```bash\npsql -h 127.0.0.1 -p 5432 -U postgres\n```\nPassword will be requested and you should enter the password you provided as parameter 'POSTGRES_PASSWORD' in the previous step (\u003cpostgres_password\u003e)\nAs with the PostgreSQL image, the default `PGDATA` directory will be mounted as a volume, so it will persist between restarts of the container. But while the above _will_ get you a running Citus instance, it won’t have any workers to exercise distributed query planning. For that, you may wish to try the included [`docker-compose.yml`][compose-config] configuration.\n\n#### Nightly Image\n\nIn addition to the `latest` (release) tag and the major-, minor-, and patch-specific tags, the `Dockerfile` in the `nightly` directory builds a tagged image with the latest Citus nightly (from the Citus `master` branch).\n\n### Docker Compose\n\nThe included `docker-compose.yml` file provides an easy way to get started with a Citus cluster, complete with multiple workers. Just copy it to your current directory and run:\n\n```bash\ndocker-compose -p citus up\n\n# Creating network \"citus_default\" with the default driver\n# Creating citus_worker_1\n# Creating citus_master\n# Creating citus_config\n# Attaching to citus_worker_1, citus_master, citus_config\n# worker_1    | The files belonging to this database system will be owned by user \"postgres\".\n# worker_1    | This user must also own the server process.\n# ...\n```\n\nThat’s it! As with the standalone mode, you’ll want to find your `docker-machine ip` if you’re using that technology, otherwise, just connect locally to `5432`. By default, you’ll only have one worker:\n\n```sql\nSELECT master_get_active_worker_nodes();\n\n--  master_get_active_worker_nodes\n-- --------------------------------\n--  (citus_worker_1,5432)\n-- (1 row)\n```\n\nBut you can add more workers at will using `docker-compose scale` in another tab. For instance, to bring your worker count to five…\n\n```bash\ndocker-compose -p citus up --scale worker=5\n\n# Creating and starting 2 ... done\n# Creating and starting 3 ... done\n# Creating and starting 4 ... done\n# Creating and starting 5 ... done\n```\n\n```sql\nSELECT master_get_active_worker_nodes();\n\n--  master_get_active_worker_nodes\n-- --------------------------------\n--  (citus_worker_5,5432)\n--  (citus_worker_1,5432)\n--  (citus_worker_3,5432)\n--  (citus_worker_2,5432)\n--  (citus_worker_4,5432)\n-- (5 rows)\n```\n\nIf you inspect the configuration file, you’ll find that there is a container that is neither a master nor worker node: `citus_config`. It simply listens for new containers tagged with the worker role, then adds them to the config file in a volume shared with the master node. If new nodes have appeared, it calls `master_initialize_node_metadata` against the master to repopulate the node table. See Citus’ [`workerlist-gen`][workerlist-gen] repo for more details.\n\nYou can stop your cluster with `docker-compose -p citus down`.\n\n## License\n\nThe following license information (and associated [LICENSE][license] file) apply _only to the files within **this** repository_. Please consult Citus’s own repository for information regarding its licensing.\n\nCopyright © 2016–2017 Citus Data, Inc.\n\nLicensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\n[image size]: https://microbadger.com/images/citusdata/citus\n[release]: https://github.com/citusdata/docker/releases/latest\n[license]: LICENSE\n[citus data]: https://www.citusdata.com\n[docker-postgres]: https://hub.docker.com/_/postgres/\n[compose-config]: docker-compose.yml\n[workerlist-gen]: https://github.com/citusdata/workerlist-gen\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitusdata%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitusdata%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitusdata%2Fdocker/lists"}