{"id":20994015,"url":"https://github.com/michelderu/docker-compose-stargate","last_synced_at":"2026-04-21T21:05:22.019Z","repository":{"id":80119642,"uuid":"335968150","full_name":"michelderu/docker-compose-stargate","owner":"michelderu","description":"Provision a three-node Cassandra cluster with Stargate enabled for easy developer integration","archived":false,"fork":false,"pushed_at":"2021-04-01T14:55:02.000Z","size":268,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-20T08:49:27.016Z","etag":null,"topics":["cassandra","docker-compose","stargate"],"latest_commit_sha":null,"homepage":"","language":null,"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/michelderu.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}},"created_at":"2021-02-04T13:49:41.000Z","updated_at":"2022-09-07T10:51:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"9259f3bb-8e82-4f16-9c38-38bcf3f690e7","html_url":"https://github.com/michelderu/docker-compose-stargate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdocker-compose-stargate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdocker-compose-stargate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdocker-compose-stargate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michelderu%2Fdocker-compose-stargate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michelderu","download_url":"https://codeload.github.com/michelderu/docker-compose-stargate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243410230,"owners_count":20286387,"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":["cassandra","docker-compose","stargate"],"created_at":"2024-11-19T07:16:28.680Z","updated_at":"2025-12-28T21:59:14.570Z","avatar_url":"https://github.com/michelderu.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Run Stargate on Cassandra using Docker Compose\n\n## Start Cassandra and Stargate\nThe `docker-compose.yml` has been configured as such to allow for a gracefull startup of all nodes and finally Stargate.\n\nIt uses the docker compose healtcheck which checks for the amount of Cassandra nodes being up and running in a healthy way (no start up, no range movement).\n```sh\ndocker-compose up -d\n```\n\n## Bash into the container\n```sh\ndocker exec -it backend-1 bash\n```\n\n## Check that everything is running\nUse `nodetool` to check the health of the system. You should see four nodes running.\n```sh\ndocker exec -it `docker ps | grep backend-1 | cut -b 1-12` nodetool status\n```\n\n## Stargate port mapping\nStargate is started with the following port mappings:\n|Port|Service|\n|----|-------|\n|8080|GraphQL interface for CRUD|\n|8081|REST authorization service for generating tokens|\n|8082|REST interface for CRUD|\n|9042|Native transport port (CQL, drivers)|\n\nAll ports available on `localhost`.\n\n## Log in to cqlsh on the Cassandra container\nLocal `cqlsh` can be downloaded from https://docs.datastax.com/en/install/6.7/install/installCqlsh.html\n```sh\ndocker exec -it backend-1 cqlsh\n```\nor\n```sh\ncqlsh localhost 9042\n```\n\n## Access the built-in Stargate Swagger UI\nTo access the Swagger UI, open http://localhost:8082/swagger-ui in your browser.  \n\n![image](images/swagger-home.png)\n\n## Access the built-in Stargate GraphQL playground\nTo access the GraphQL UI, open http://localhost:8080/playground in your browser.  \n\n![image](images/playground-home.png)\n\n## Example using CURL: Generate an auth token\n```sh\ncurl -L -X POST 'http://localhost:8081/v1/auth' -H 'Content-Type: application/json' --data-raw '{\n    \"username\": \"cassandra\",\n    \"password\": \"cassandra\"\n  }'\n```\n\n# Using Stargate on Astra and locally\nThis part is all about how to use the REST, Document and GraphQL API's with Cassandra. \n\nFor accessing the endpoints, Postman (https://www.postman.com) will be used, for which `collection` and `environment` definitions are provided.\n\nThe files in this repository are inspired on the work done by Dave Joy, see: https://www.youtube.com/watch?v=SU3Z4msZaDU.\n\n## Differences in URL postfixes between Astra and locally\nFirst of all it is important to note that the URLs of the Stargate endpoints, apart from the hostname of course, are a bit different. As follows:\n\n|API|Astra URL postfix|Local URL postfix|\n|---|-----|-----|\n|REST and Document|/api/rest|:8082|\n|GraphQL|/api|:8080|\n|Authorization|/api/rest|:8081|\n\nFor this reason two separate environment definitions are provided:\n- Local Stargate (fully configured): `Local Stargate.postman_environment.json`\n- Astra (needs configuring): `Astra.postman_environment.json`\n\nIn order to use these defintions just load them into Postman.  \n\n### When using Astra instead of local\nFor Astra, make sure you configure the following variables:\n- hostname\n- username\n- password\n\n## Load the collections of API calls\nIn order to load the collection of API calls to play with the endpoints, load `Stargate Access.postman_environment.json`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelderu%2Fdocker-compose-stargate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichelderu%2Fdocker-compose-stargate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichelderu%2Fdocker-compose-stargate/lists"}