Skip to content

kbiits/go-microservices-grpc-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservices in Golang using gRPC

Pre-Install

You must have mongodb installed in your machine and already configured to allow connections from docker container.
To do that, modify file /etc/mongodb.conf and add docker bridge ip in net section of the configuration

# bind ip to 172.17.0.1 to allow connections from docker container
# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1,172.17.0.1

Installation

Clone this repo

git clone https://github.com/kbiits/go-microservices-grpc-example

Create user for mongodb

mongo user/mongo-init.js

Create docker network

docker network create microservices

Build golang microservices app
note: I don't add build steps to Dockerfile because I want to reduce the size of created images

Build advice service :

cd advice
make build
cd ..

Build user service :

cd user
make build
cd ..

Build gateway :

cd gateway
make build
cd ..

Run docker

docker compose up -d

And taraa, you can see the website running on localhost:3000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published