{"id":25005020,"url":"https://github.com/johnsalazar/microservices-go-infra","last_synced_at":"2026-04-11T06:03:43.076Z","repository":{"id":213170308,"uuid":"733203400","full_name":"JohnSalazar/microservices-go-infra","owner":"JohnSalazar","description":"About infrastructure deployment. Part of an e-commerce built in Golang.","archived":false,"fork":false,"pushed_at":"2023-12-18T20:40:57.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T00:09:40.055Z","etag":null,"topics":["docker","docker-compose","docker-container","docker-image","dockerfile","kubernetes","kubernetes-deployment","microk8s"],"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/JohnSalazar.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}},"created_at":"2023-12-18T19:49:14.000Z","updated_at":"2023-12-23T05:53:56.000Z","dependencies_parsed_at":"2023-12-19T03:45:32.504Z","dependency_job_id":"679b77ad-a61c-4233-8823-501177c55111","html_url":"https://github.com/JohnSalazar/microservices-go-infra","commit_stats":null,"previous_names":["johnsalazar/microservices-go-infra"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSalazar%2Fmicroservices-go-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSalazar%2Fmicroservices-go-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSalazar%2Fmicroservices-go-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnSalazar%2Fmicroservices-go-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnSalazar","download_url":"https://codeload.github.com/JohnSalazar/microservices-go-infra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246254100,"owners_count":20747948,"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","docker-compose","docker-container","docker-image","dockerfile","kubernetes","kubernetes-deployment","microk8s"],"created_at":"2025-02-05T00:09:54.766Z","updated_at":"2025-12-30T23:17:27.497Z","avatar_url":"https://github.com/JohnSalazar.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Microservices in Golang - Infra**\n\n---\n\n## Plataform\n\n- Docker\n- Kubernetes\n\n---\n\n## How to build this project\n\n### To build this project, you will need to install the following tools:\n\n## Mandatory Tools:\n\n- Docker\n- Docker Compose\n- Adding Hosts to /etc/hosts:\n  `127.0.0.1 mymicroservices.com`\n\n---\n\n## Optional Tools:\n\n- **_Kubernetes_** (if you want to scale the application)\n\n  - For Ubuntu, Kubernetes can be easily installed using [MicroK8s](https://microk8s.io/)\n  - It is necessary to install the following plugins on Kubernetes or MicroK8s:\n\n    - cert-manager (certificate manager for TLS)\n    - nginx-ingress-controller (ingress-controller for service routes within Kubernetes)\n\n- **_Portainer_** - [Container manager for both Docker and Kubernetes](https://docs.portainer.io/start/install-ce/server)\n\n---\n\n## Running with Docker:\n\nBuild Docker containers for the services by navigating to the service folders containing the Dockerfile and running the command:\n\n#### authentications:\n\n```\ndocker build --no-cache -t authentications:latest .\n```\n\n#### carts:\n\n```\ndocker build --no-cache -t carts:latest .\n```\n\n#### customers:\n\n```\ndocker build --no-cache -t customers:latest .\n```\n\n#### emails:\n\n```\ndocker build --no-cache -t emails:latest .\n```\n\n#### orders:\n\n```\ndocker build --no-cache -t orders:latest .\n```\n\n#### payments:\n\n```\ndocker build --no-cache -t payments:latest .\n```\n\n#### products:\n\n```\ndocker build --no-cache -t products:latest .\n```\n\n#### web:\n\n```\ndocker build --no-cache -t web:latest .\n```\n\n---\n\nIn the infra project folder, navigate to the **_monitoring_** folder. In this folder, you'll find the following files:\n\n- **docker-compose.dev.yml** (development)\n- **docker-compose.prod.yml** (production)\n\n---\n\nExecute the following command:\n\n```\ndocker compose -f docker-compose.dev.yml up -d\n```\n\n### Development for debugging:\n\nCreate the database for the products service, using **pgAdmin 4**:\n\n- Access **_pgAdmin_**: http://localhost:5050\n  - Login: admin@admin.com\n  - Password: root\n- Create a database named \"**products**\"\n- Run the query for the products service: **_sql/01_init.up.sql_** within the **\"products\"** database to create the tables for this service. **Restart the products-srv service in Docker**.\n\n---\n\n## Running with Kubernetes:\n\nIn the infra project folder, navigate to the **_k8s_** folder. In this folder, you'll find the following files:\n\n- **deploy.sh** (deploy the application)\n\n  - run the deploy.sh executable.\n\n- **destroy.sh** (bring down the application)\n  - run the destroy.sh executable.\n\n---\n\n## How to access the application\n\nTo access the application: https://localhost or https://mymicroservices.com\n\n---\n\n## List of Services\n\n### This service is part of the e-commerce application\n\n- [Authentication](https://github.com/JohnSalazar/microservices-go-authentication)\n- [Email](https://github.com/JohnSalazar/microservices-go-email)\n- [Customer](https://github.com/JohnSalazar/microservices-go-customer)\n- [Product](https://github.com/JohnSalazar/microservices-go-product)\n- [Cart](https://github.com/JohnSalazar/microservices-go-cart)\n- [Order](https://github.com/JohnSalazar/microservices-go-order)\n- [Payment](https://github.com/JohnSalazar/microservices-go-payment)\n- [Web](https://github.com/JohnSalazar/microservices-go-web)\n\n---\n\n## About\n\nInfrastructure deployment was developed by [oceano.dev](https://oceano.dev/) \u003cimg alt=\"Brasil\" src=\"https://github.com/JohnSalazar/microservices-go-infra/assets/16736914/8682ce50-e5a3-4f45-ab87-16c71be6e5e1\" width=\"20\" height=\"14\" /\u003e team under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsalazar%2Fmicroservices-go-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnsalazar%2Fmicroservices-go-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsalazar%2Fmicroservices-go-infra/lists"}