Skip to content

dev2choiz/hello

Repository files navigation

dev environment

Requirements

  • Create a .env.local file taking for example .env.local.example
  • Create a ./front-next/.env.local file taking for example ./front-next/.env.local.example

Start the backend

make start

This command run in docker:

  • 3 micro-services using golang and gRPC to expose the api
  • The ESPv2 (Extensible Service Proxy) used as envoy sidecar
  • Protoc container to generate protobuf files
  • A postgres database

Front

The front is done with next.js and typescript.
It uses grpc-web to communicate with the gRPC api through the http2 protocol.
This application is an example of how to do SSR, **SSG, ISR and SPA with next.js.

Start the stack

Go to the directory

cd front-next

Start the containers

make docker-network up

Install npm dependencies

make install

Generate the typescript protobufs from .proto files

make gen-proto

Start next.js app on http://localhost:3000

make dev

Deployment

Micro-services

The micro-services are deployed in a GKE cluster provided by terraform.

A jenkins job triggers a gcp cloud build who will build a docker image in gcr and use helm to deploy pods in the cluster. The others resources (ingress, secret, ...) are generated with terraform.

Front

The next.js front is deployed in google cloud run

As for micro-services, a jenkins job triggers a gcp cloud-build which builds a docker image then deploy it in a cloud run. The load balancer and others resources are generated with terraform.

Others

postgres migrations

About

micro service / GCP / terraform / golang / grpc / react / vue

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published