{"id":15130039,"url":"https://github.com/hassonor/wiser","last_synced_at":"2026-01-18T11:42:10.073Z","repository":{"id":248910966,"uuid":"830115900","full_name":"hassonor/wiser","owner":"hassonor","description":"NestJS Microservices app ","archived":false,"fork":false,"pushed_at":"2024-12-30T08:23:54.000Z","size":495,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-04-05T19:41:26.199Z","etag":null,"topics":["aws","google-cloud","helm","ingress","k8s","microservices","mongodb","nestjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/hassonor.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":"2024-07-17T16:08:12.000Z","updated_at":"2024-12-30T08:23:57.000Z","dependencies_parsed_at":"2024-12-30T09:37:25.646Z","dependency_job_id":"4b0d20cc-718a-4966-b69f-dfd74d3ff8e7","html_url":"https://github.com/hassonor/wiser","commit_stats":null,"previous_names":["hassonor/wiser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hassonor/wiser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassonor%2Fwiser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassonor%2Fwiser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassonor%2Fwiser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassonor%2Fwiser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hassonor","download_url":"https://codeload.github.com/hassonor/wiser/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassonor%2Fwiser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["aws","google-cloud","helm","ingress","k8s","microservices","mongodb","nestjs","typescript"],"created_at":"2024-09-26T02:27:47.222Z","updated_at":"2026-01-18T11:42:10.052Z","avatar_url":"https://github.com/hassonor.png","language":"TypeScript","funding_links":["https://opencollective.com/nest","https://paypal.me/kamilmysliwiec"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"http://nestjs.com/\" target=\"blank\"\u003e\u003cimg src=\"https://nestjs.com/img/logo-small.svg\" width=\"200\" alt=\"Nest Logo\" /\u003e\u003c/a\u003e\n \u003c/p\u003e\n\n[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456\n\n[circleci-url]: https://circleci.com/gh/nestjs/nest\n\n  \u003cp align=\"center\"\u003eA progressive \u003ca href=\"http://nodejs.org\" target=\"_blank\"\u003eNode.js\u003c/a\u003e framework for building efficient and scalable server-side applications.\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@nestjs/core.svg\" alt=\"NPM Version\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@nestjs/core.svg\" alt=\"Package License\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@nestjs/common.svg\" alt=\"NPM Downloads\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://circleci.com/gh/nestjs/nest\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/circleci/build/github/nestjs/nest/master\" alt=\"CircleCI\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://coveralls.io/github/nestjs/nest?branch=master\" target=\"_blank\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9\" alt=\"Coverage\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://discord.gg/G7Qnnhy\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/discord-online-brightgreen.svg\" alt=\"Discord\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/nest#backer\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/nest/backers/badge.svg\" alt=\"Backers on Open Collective\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/nest#sponsor\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/nest/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://paypal.me/kamilmysliwiec\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-ff3f59.svg\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://opencollective.com/nest#sponsor\"  target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg\" alt=\"Support us\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://twitter.com/nestframework\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/nestframework.svg?style=social\u0026label=Follow\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n  \u003c!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)\n  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)--\u003e\n\n## Description\n\nGCP CI/CD Deployment with Kubernetes\n\n*Note: anything like _var_ it means you have to fill this with appropriate value:\n\n1- Enable Google Container Registry API \u0026 Artifact Registry:\n\n    a. Create Repository for each service:\n\n        i. Install gcloud cli\n\n        ii. Initialize gcloud\n\n        iii. Set project of gcloud to your project\n\n        iv. gcloud authentication\n\n    b. Build \u0026 push images (e.g. reservations):\n\n    cd /apps/reservations/\n    docker build -t reservations -f ./Dockerfile ../../\n    docker tag reservations _reservations_repo_url_/production\n    docker image push _reservations_repo_url_/production\n\n2- Automated CI/CD with Google CloudBuild:\n\n    a. Create cloudbuild.yaml file at your project’s root: each repository will have two steps:\n\n        i. Build step\n\n        ii. Push step\n\n    b. Set up a build trigger that pulls from your github repo and builds images using the latest changes on code.\n\n3- Setup Kubernetes (locally)\n\n    a. Enable Kubernetes from Docker Desktop\n\n    b. Install \"helm\" as dependency manager for Kubernetes cluster\n\n    c. mkdir k8s directory, and: cd k8s/\n\n    d. Create a new HELM chart (e.g. named wiser):\n\n    helm create wiser\n\n    e. Create Deployments (pods) for each one of the services:\n\n        i. Install kubectl if not exists.\n\n        ii. Create deployment:\n\n        kubectl create deployment reservations --image=_gcloud_image_url_ --dry-run=client -o yaml \u003e ./wiser/templates/reservations/deployment.yaml\n\n        iii. Install helm chart named \"wiser\":\n\n        helm install wiser ./k8s/\n\n        iv. Double check created pod with command:\n\n        kubectl get pods\n\n4- Enable local Kubernetes cluster to access Artifact Registry images:\n\n    a. Get API keys:\n\n        i. Go to GCloud: \"APIs \u0026 Services\" -\u003e credentials -\u003e service account (Role: artifact registry reader)\n\n        ii. Service account -\u003e Keys -\u003e Json -\u003e create\n\n    b. Tell Kubernetes to use the JSON key file when pulling from GCR:\n\n        i. Create Kubernetes secret:\n\n        kubectl create secret docker-registry gcr-json-key --docker-server=_first_part_of_service_url_ --docker-username=_json_key --docker-password=\"$(cat _path_to_json_key_file_)\" --docker-email=blabla@blac.com\n\n        ii. Tell the \"default\" service-account, in GCP, to use this secret:\n\n        kubectl patch serviceaccount default -p '{\"imagePullSecrets\": [ { \"name\": \"gcr-json-key\" } ] }'\n\n        iii. Double Check:\n\n        kubectl get pods\n\n5- Create Kubernetes cluster services:\n\n    a. To create generic secrets for sensitive env vars to be used in services to use: (e.g. secret object \"jwt\" and variable \"refreshToken\" with value \"blablabla\")\n\n        i. Create secret:\n\n        kubectl create secret generic \"jwt\" --from-literal=refreshToken=blablabla\n\n        ii. Update chart with command:\n\n        helm upgrade wiser ./k8s/wiser\n\n        iii. To update a current secret (e.g., google) for a service (e.g., notifications):\n\n        kubectl edit secret google\n        kubectl rollout restart deployment notifications\n        kubectl get pods\n\n    b. Generate a service for a microservice (e.g. auth, ports exposed 3002/tcp, and 3001/http):\n\n        i. Create two services, one for tcp, and one for http:\n\n        kubectl create service clusterip \"auth-tcp\" --tcp=3002 --dry-run=client -o yaml \u003e k8s/wiser/templates/auth/service-tcp.yaml\n        kubectl create service nodeport auth-http --tcp=3001 --dry-run=client -o yaml \u003e k8s/wiser/templates/auth/service-http.yaml\n\n        ii. Update chart:\n\n        helm upgrade wiser k8s/wiser\n\n        iii. Double check with:\n\n        kubectl get svc\n\n6- To connect local machine to the online Google Kubernetes Engine’s cluster:\n\n    a. Get connect command from: GKE -\u003e Clusters -\u003e “Connect” Button , and then run it locally.\n\n    b. List all contexts (clusters) to copy the name of the GKE one:\n\n    kubectl config get-contexts\n\n    c. Switch to online GKE cluster:\n\n    kubectl config use-context _context_name_\n\n[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.\n\n## Installation\n\n```bash\n$ pnpm install\n```\n\n## Running the app\n\n```bash\n# development\n$ pnpm run start\n\n# watch mode\n$ pnpm run start:dev\n\n# production mode\n$ pnpm run start:prod\n```\n\n## Test\n\n```bash\n# unit tests\n$ pnpm run test\n\n# e2e tests\n$ pnpm run test:e2e\n\n# test coverage\n$ pnpm run test:cov\n```\n\n## Support\n\nNest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If\nyou'd like to join them, please [read more here](https://docs.nestjs.com/support).\n\n## Stay in touch\n\n- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)\n- Website - [https://nestjs.com](https://nestjs.com/)\n- Twitter - [@nestframework](https://twitter.com/nestframework)\n\n## License\n\nNest is [MIT licensed](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhassonor%2Fwiser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhassonor%2Fwiser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhassonor%2Fwiser/lists"}