{"id":31738166,"url":"https://github.com/robert076/logger","last_synced_at":"2026-07-12T23:31:56.281Z","repository":{"id":291703220,"uuid":"978495073","full_name":"Robert076/logger","owner":"Robert076","description":" Go-based logger app with two microservices: one logs messages, the other sends pings every 5 seconds. Runs on Minikube with Kubernetes, using a job to auto-init the database table for setup.","archived":false,"fork":false,"pushed_at":"2025-05-11T09:30:56.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-18T23:52:21.731Z","etag":null,"topics":["docker","docker-compose","golang","http","kubernetes","kubernetes-jobs","microservice","port-forwarding","scalability"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Robert076.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-06T04:35:34.000Z","updated_at":"2025-05-11T09:31:00.000Z","dependencies_parsed_at":"2025-05-06T05:40:04.102Z","dependency_job_id":null,"html_url":"https://github.com/Robert076/logger","commit_stats":null,"previous_names":["robert076/logger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Robert076/logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert076%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert076%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert076%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert076%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Robert076","download_url":"https://codeload.github.com/Robert076/logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert076%2Flogger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35405750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","golang","http","kubernetes","kubernetes-jobs","microservice","port-forwarding","scalability"],"created_at":"2025-10-09T09:53:39.447Z","updated_at":"2026-07-12T23:31:56.261Z","avatar_url":"https://github.com/Robert076.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 logger app\nContains 2 main services: One *spams* the other with messages while the other *logs* the messages it received.\n\n🌐 First service: **Logger**\n- Every time the route `/ping` is being called with an *http post* request, it adds a log of the message in the request body.\n- Displays all the logs from its database.\n\n💻 Second service: **Pinger**\n- Pings the *logger service* and sends *http post* requests with a random message every 5 seconds to that `/ping` route.\n\n---\n\n### 🏁 Running the app ***(locally, using minikube and macOS)***\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/Robert076/logger.git\n```\n\n2. Start your local *minikube* server:\n\n```bash\nminikube start\n```\n\n3. Run the *Kubernetes* deployment:\n\n```bash\nkubectl apply -f kubernetes/\n```\n\n4. Port forward the logger port from inside the minikube\n\n```bash\nkubectl port-forward service/logger-service 8080:8080\n```\n\n5. Visit [localhost:8080/pings](http://localhost:8080/pings) on your browser.\n\n---\n\n### Project structure\n\n```bash\n📁 .\n├── 📜 LICENSE\n├── 📘 README.md\n├── 📁 kubernetes\n│   ├── 📦 db-deployment.yml                # deployment for the postgres container\n│   ├── 💾 db-pvc.yml                       # persistent volume claim so we don't lose the data from the database\n│   ├── 🌐 db-service.yml                   # k8s service for the database\n│   │── ⚙️ init-ping-table.yml              # k8s job to automatically create the table in he database so the program works as expected with no manual intervention\n│   ├── ⚙️ logger-config.yml                # config map for the project's env vars\n│   ├── 📦 logger-deployment.yml            # deployment for the logger service\n│   ├── 🌐 logger-service.yml               # k8s service for the logger\n│   ├── 📦 pg-deployment.yml                # deployment for the pg container (optional, we don't use pg anyways)\n│   └── 🌐 pg-service.yml                   # k8s service for the pg service (optional, we don't use pg anyways)\n├── 📁 logger-service\n│   ├── 🐳 Dockerfile                       # Dockerfile for building the logger image\n│   ├── 📁 db\n│   │   └── 🛢️ db.go                        # database module for the logger app\n│   ├── 🐙 docker-compose.yml               # docker-compose for local development, run with this if you don't want to use k8s\n│   ├── 📦 go.mod                           # go module\n│   ├── 📦 go.sum                           # imports for the logger app\n│   ├── 🚀 main.go                          # main for the logger service\n│   └── 📁 ping            \n│       └── 📄 ping.go                      # data structure for the ping\n└── 📁 pinger-service\n    ├── 📦 go.mod                           # go module\n    ├── 🚀 main.go                          # main for the pinger service\n    └── 📁 messages\n        └── 💬 messages.go                  # 20 random hardcoded messages\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobert076%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobert076%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobert076%2Flogger/lists"}