Coder Social home page Coder Social logo

micro_service's Introduction

用户服务

使用

下载依赖包

export GOPROXY=https://goproxy.io
go get -v -u github.com/golang/protobuf/protoc-gen-go
go get -v -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway

export GO111MODULE=auto
go mod tidy

编译

mkdir pkg/pb

protoc -I ./api --go_out=plugins=grpc:./pkg/pb/ api/*.proto

go build -ldflags='-s -w' -o userService cmd/userservice/main.go

编译成 docker 镜像

./build/ci/compile_userservice.sh

docker build -t userservice:1.0.0 -f build/deploy/Dockerfile_user .

api gateway

使用

下载依赖包

export GOPROXY=https://goproxy.io
go get -v -u github.com/golang/protobuf/protoc-gen-go
go get -v -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get -v -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway

export GO111MODULE=auto
go mod tidy

编译

mkdir pkg/pb

protoc -I ./api -I $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:./pkg/pb/ api/user.proto
 
protoc -I ./api -I $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --grpc-gateway_out=logtostderr=true:./pkg/pb/ api/user.proto

go build -ldflags='-s -w' -o apigateway cmd/apigateway/main.go

编译成 docker 镜像

./build/ci/compile_apigateway.sh

docker build -t apigateway:1.0.0 -f build/deploy/Dockerfile_gateway .

商户服务

编译

./build/ci/compile_merchantservice.sh

编译成 docker 镜像

./build/ci/compile_merchantservice.sh

docker build -t merchantservice:1.0.0 -f build/deploy/Dockerfile_merchant .

camunda

编译

protoc -I ./api/camunda --go_out=plugins=grpc:./pkg/camunda/pb api/camunda/*.proto

扫码类交易

编译

protoc -I ./api/apstfr --go_out=plugins=grpc:./pkg/apstfr/apstfrpb api/apstfr/*.proto

micro_service's People

Contributors

liqingsanjin avatar laybay avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

grzeng-go

micro_service's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.