{"id":17540592,"url":"https://github.com/inadarei/microservices-workspace","last_synced_at":"2025-07-07T19:15:53.011Z","repository":{"id":138716891,"uuid":"84701506","full_name":"inadarei/microservices-workspace","owner":"inadarei","description":"Batteries-included blueprint of a comfortable development environment for a heterogenous microservices project. ","archived":false,"fork":false,"pushed_at":"2022-08-13T15:07:55.000Z","size":19834,"stargazers_count":32,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-23T22:54:17.126Z","etag":null,"topics":["docker","golang","microservices","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/inadarei.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":"2017-03-12T05:08:45.000Z","updated_at":"2025-02-17T15:32:36.000Z","dependencies_parsed_at":"2023-07-04T09:31:40.972Z","dependency_job_id":null,"html_url":"https://github.com/inadarei/microservices-workspace","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inadarei%2Fmicroservices-workspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inadarei%2Fmicroservices-workspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inadarei%2Fmicroservices-workspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inadarei%2Fmicroservices-workspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inadarei","download_url":"https://codeload.github.com/inadarei/microservices-workspace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528700,"owners_count":21445511,"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":["docker","golang","microservices","nodejs"],"created_at":"2024-10-20T22:24:28.839Z","updated_at":"2025-04-23T22:54:27.054Z","avatar_url":"https://github.com/inadarei.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# microservices-workspace\nExample local setup for developing heterogeneous microservices.\n\nIn this setup we show:\n\n1. A microservcie written in Go and set up with code hot-reloading for\n   comfortable development. \n2. A microservice written in Node and similarly set up with code hot-reloading\n3. A [Traefik](https://traefik.io/)-based frontend reverse-proxy wiring microservices to various \n   routes so that the clients don't need to know about, and/or hardcode their \n   calls against, multiple ports the microservices actualy serve from. \n4. Resilient set-up of database that a microservice can use (MySQL for the sake\n   of the demo). Database setup uses Docker volumes and survives container\n   restarts/crashes.\n5. Each microservice is checked into their own Git repository. This main\n   repository you are currently viewing simply orchestrates creation of a single\n   \"workspace\" point, from which all developers can grab the entire project and\n   easily build it.\n\nThis approach allows developers to easily switch between working on just a\nspecific microservice and a larger \"project space\".\n\nAs systems get large you may want to have more than one project space. That is a\ndecision you would take based on your unique needs. However, this blueprint\nworkspace provides a lot of recipes to get you on the journey of breaking-up and\ncomposing work as you see fit and creating an enjoyable, yet simple development\nworkspace.\n\n## Prerequisites:\n\nA working Docker setup, which you can get pretty easily for most major platforms\nlike Mac, Windows and Linux flavors:\n\u003chttps://www.docker.com/community-edition#/download\u003e \n\n## Installing\n\nTo run the entire project with all microservices and databases:\n\n```\n\u003e git clone https://github.com/inadarei/microservices-workspace.git \u0026\u0026 cd microservices-workspace\n\n# Bring everything up in daemon mode: \n\u003e make\n\n# Make sure everything started fine:\n\u003e make ps\n```\n\nTo tear-down the project:\n\n```\n\u003e make stop\n```\n\n## Using\n\nOnce everything is properly installed various microservices can be accessed at\nsub-routes of the front-end reverse proxy's URI. In the out-of-the-box installation, \nyou get two microservices respectively at:\n\n```\n\u003e curl http://ms-demo-node-ms-workspace-demo.docker.localhost:9080/\n# and\n\u003e curl http://ms-demo-golang-ms-workspace-demo.docker.localhost:9080/\n```\n\nPlease note that \"ms-demo-node-ms-workspace-demo\" and \"ms-demo-golang-ms-workspace-demo\"\nare the automatically-detected hostnames (subdomains) generated from the microservice\ncontainer names (`ms-demo-node` and `ms-demo-golang`) and the Docker \nproject namespace: `ms-workspace-demo`.\n\nThese hostname can be overwritten using more specific labels in the docker-compose\nfile of corresponding microservices, for example by placing something like the \nfollowing in `ms-demo-node/docker-compose.yaml`:\n\n```yaml\nlabels:\n    - \"traefik.http.routers.ms-demo-node.rule=Host(`demonode.docker.localhost`)\"\n```\n\nwhich would allow demo node microservice to be available by invoking a shorter\nURL, along the lines of: `curl http://demonode.docker.localhost:9080/`\n\nIf you want the project to run on a port different from 9080, you can change\nthe value in the topmost\n[dockor-compose.yml](https://github.com/inadarei/microservices-workspace/blob/master/docker-compose.yml).\nFor instance, to make it run on port 80:\n\n```\nports:\n  - \"80:80\"\n```\n\n## Service Discovery – Traefik\n\n**Q:** How are microservices discovered by the front-end proxy?\n\n**A:** The workspace uses a modern, highly capable proxy:\n[Traefik](https://docs.traefik.io/) which automatically discovers services in\nyour project and wires them up to the proper sub-routes.\n\nOnce you have the project up, you can access the web UI of the proxy at:\nhttp://0.0.0.0:9880/\n\n## How to add more microservices:\n\n- Edit config/repos.json\n- Run `make update` in the topmost repository to get the new codebase\n- Edit start.sh and stop.sh scripts under ./bin to add start and stop\n  commands for the new module. Existing commands should be used as a guide.\n- Make sure the docker-compose file for the service has labels required\n  by Traefik \n  \n  example: \u003chttps://github.com/inadarei/microservices-workspace-ms-demo-node/blob/master/docker-compose.yml#L6\u003e)\n- Make sure the docker-compose commands are starting your new service\n  in the same project as the Traefik and the rest of the services\n\n  example: \u003chttps://github.com/inadarei/microservices-workspace-ms-demo-node/blob/master/Makefile#L3\u003e \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finadarei%2Fmicroservices-workspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finadarei%2Fmicroservices-workspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finadarei%2Fmicroservices-workspace/lists"}