Skip to content

Digivision's backend gRPC service with REST/HTTP gateway

License

Notifications You must be signed in to change notification settings

arimanius/digivision-backend

Repository files navigation

Digivision Backend

A service to search and retrieve products from Digikala.

Development

To download dependencies:

make download-dependencies

To build:

make build

To run unit tests:

make test

To run locally after build:

./dvs serve --dev

Building protobufs

protoc --proto_path=api/proto/v1 --proto_path=third_party --go_out=pkg/api/v1 --go-grpc_out=pkg/api/v1 --grpc-gateway_out=logtostderr=true:pkg/api/v1 --swagger_out=logtostderr=true:api/swagger/v1 search.proto
protoc --proto_path=api/proto/img2vec --go_out=internal/api/img2vec --go-grpc_out=internal/api/img2vec img2vec.proto
protoc --proto_path=api/proto/od --go_out=internal/api/od --go-grpc_out=internal/api/od object_detector.proto

Build docker image

To build:

make docker-build VERSION=0.0.1

To push to registry:

make docker-push VERSION=0.0.1

Deployment

Local (docker compose)

if you want to deploy on development environment with docker compose:

cp .env.sample .env
make deploy-dev