{"id":25493714,"url":"https://github.com/mahshid1378/voting-app","last_synced_at":"2026-04-08T18:06:51.048Z","repository":{"id":278142709,"uuid":"934650329","full_name":"mahshid1378/voting-app","owner":"mahshid1378","description":"Example distributed app composed of multiple containers for Docker, Compose, Swarm, and Kubernetes","archived":false,"fork":false,"pushed_at":"2025-02-18T08:11:19.000Z","size":239,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-08T02:42:35.571Z","etag":null,"topics":["docker","docker-compose","docker-container","docker-image","docker-swarm","dockerfile","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"C#","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/mahshid1378.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":"2025-02-18T07:21:52.000Z","updated_at":"2025-02-18T08:11:22.000Z","dependencies_parsed_at":"2025-02-18T08:43:03.143Z","dependency_job_id":null,"html_url":"https://github.com/mahshid1378/voting-app","commit_stats":null,"previous_names":["mahshid1378/voting-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mahshid1378/voting-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahshid1378%2Fvoting-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahshid1378%2Fvoting-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahshid1378%2Fvoting-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahshid1378%2Fvoting-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahshid1378","download_url":"https://codeload.github.com/mahshid1378/voting-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahshid1378%2Fvoting-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567348,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["docker","docker-compose","docker-container","docker-image","docker-swarm","dockerfile","kubernetes"],"created_at":"2025-02-18T23:17:08.661Z","updated_at":"2026-04-08T18:06:51.026Z","avatar_url":"https://github.com/mahshid1378.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example Voting App\n\nA simple distributed application running across multiple Docker containers.\n\n## Getting started\n\nDownload [Docker Desktop](https://www.docker.com/products/docker-desktop) for Mac or Windows. [Docker Compose](https://docs.docker.com/compose) will be automatically installed. On Linux, make sure you have the latest version of [Compose](https://docs.docker.com/compose/install/).\n\nThis solution uses Python, Node.js, .NET, with Redis for messaging and Postgres for storage.\n\nRun in this directory to build and run the app:\n\n```shell\ndocker compose up\n```\n\nThe `vote` app will be running at [http://localhost:8080](http://localhost:8080), and the `results` will be at [http://localhost:8081](http://localhost:8081).\n\nAlternately, if you want to run it on a [Docker Swarm](https://docs.docker.com/engine/swarm/), first make sure you have a swarm. If you don't, run:\n\n```shell\ndocker swarm init\n```\n\nOnce you have your swarm, in this directory run:\n\n```shell\ndocker stack deploy --compose-file docker-stack.yml vote\n```\n\n## Run the app in Kubernetes\n\nThe folder k8s-specifications contains the YAML specifications of the Voting App's services.\n\nRun the following command to create the deployments and services. Note it will create these resources in your current namespace (`default` if you haven't changed it.)\n\n```shell\nkubectl create -f k8s-specifications/\n```\n\nThe `vote` web app is then available on port 31000 on each host of the cluster, the `result` web app is available on port 31001.\n\nTo remove them, run:\n\n```shell\nkubectl delete -f k8s-specifications/\n```\n\n## Architecture\n\n![Architecture diagram](architecture.excalidraw.png)\n\n## Notes\n\nThe voting application only accepts one vote per client browser. It does not register additional votes if a vote has already been submitted from a client.\n\nThis isn't an example of a properly architected perfectly designed distributed app... it's just a simple\nexample of the various types of pieces and languages you might see (queues, persistent data, etc), and how to\ndeal with them in Docker at a basic level.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahshid1378%2Fvoting-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahshid1378%2Fvoting-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahshid1378%2Fvoting-app/lists"}