{"id":15427233,"url":"https://github.com/robinmanuelthiel/cosmos-db-setup","last_synced_at":"2026-04-10T13:30:17.086Z","repository":{"id":74655562,"uuid":"477358144","full_name":"robinmanuelthiel/cosmos-db-setup","owner":"robinmanuelthiel","description":"Instantiate the Azure Cosmos DB by creating databases and containers","archived":false,"fork":false,"pushed_at":"2022-09-01T12:17:40.000Z","size":89,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T10:21:47.875Z","etag":null,"topics":["cosmosdb"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robinmanuelthiel.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-04-03T13:59:27.000Z","updated_at":"2022-04-04T07:56:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f1464e0-b280-4146-a9a6-96d3553ee9b1","html_url":"https://github.com/robinmanuelthiel/cosmos-db-setup","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"3244785af62f8a90a218d7d84ff51a57cd42aa74"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinmanuelthiel%2Fcosmos-db-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinmanuelthiel%2Fcosmos-db-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinmanuelthiel%2Fcosmos-db-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinmanuelthiel%2Fcosmos-db-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robinmanuelthiel","download_url":"https://codeload.github.com/robinmanuelthiel/cosmos-db-setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239979769,"owners_count":19728598,"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":["cosmosdb"],"created_at":"2024-10-01T17:59:08.022Z","updated_at":"2026-04-10T13:30:17.042Z","avatar_url":"https://github.com/robinmanuelthiel.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Cosmos DB Setup Container\n\nInstantiate the Azure Cosmos DB by creating databases and containers\n\n[![adasd](https://img.shields.io/badge/Docker_Hub-robinmanuelthiel/cosmos--db--setup:latest-blue?logo=docker)](https://hub.docker.com/r/robinmanuelthiel/cosmos-db-setup/)\n\n```bash\ndocker run --rm robinmanuelthiel/cosmos-db-setup:latest \"{\\\"databaseName\\\": \\\"test\\\", \\\"containers\\\": [{\\\"name\\\": \\\"mycontainer\\\", \\\"partitionKey\\\": \\\"/id\\\"}]}\"\n```\n\n## Configuration\n\nTo configure the container, you need to provide a JSON configuration as an argument.\n\n```json\n{\n  \"databaseName\": \"test\",\n  \"containers\": [\n    {\n      \"name\": \"mycontainer\",\n      \"partitionKey\": \"/id\"\n    }\n  ]\n}\n```\n\nAdditionally, you can set the following environment variables:\n\n| Environment Variable | Description | Default |\n| -- | -- | -- |\n| `CONNECTION_STRING` | | `AccountEndpoint=https://cosmosdb:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==` |\n| `DELAY` | The delay in seconds to wait until start seeding | `0` |\n\n## Examples\n\n### Setup Cosmos DB Emulator with Docker Compose\n\n```yaml\nversion: '3.6'\nservices:\n  setup:\n    image: robinmanuelthiel/cosmos-db-setup:latest\n    command:\n      - \"{\\\"databaseName\\\": \\\"test\\\", \\\"containers\\\": [{\\\"name\\\": \\\"mycontainer\\\", \\\"partitionKey\\\": \\\"/id\\\"}]}\"\n    depends_on:\n      - cosmosdb\n\n  cosmosdb:\n    image: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator\n    hostname: cosmosdb\n    container_name: cosmosdb\n    mem_limit: 3g\n    cpus: 2.0\n    ports:\n      - '8081:8081'\n      - '10251:10251'\n      - '10252:10252'\n      - '10254:10254'\n    environment:\n      - AZURE_COSMOS_EMULATOR_PARTITION_COUNT=10\n      - AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE=true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinmanuelthiel%2Fcosmos-db-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinmanuelthiel%2Fcosmos-db-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinmanuelthiel%2Fcosmos-db-setup/lists"}