Categorygithub.com/MarketScrapperAPI/ItemAPI
modulepackage
0.0.0-20230525231301-f959fb04cd79
Repository: https://github.com/marketscrapperapi/itemapi.git
Documentation: pkg.go.dev

# README

ItemAPI

API to store item resources.

lauch database locally

docker run --name some-postgres -e POSTGRES_PASSWORD=pw1234 -e POSTGRES_USER=user -e POSTGRES_DB=item -p 5432:5432 -d postgres

gRPC

Generation

protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative ./proto/item_api.proto

Kubernetes

ItemAPI

k8s-deployment.yml

Postgres

Guide can be found here.

Deployment

  • Config map - Creates a environment space to define variables
kubectl apply -f k8s/k8s-postgres-configmap.yml
  • Persistent Volume Claim - Creates a Persistent space on memory
kubectl apply -f k8s/k8s-persistent-volume.yml
  • Postgres Deployment - Create deployment postgres
kubectl apply -f k8s/k8s-postgres-deployment.yml
  • Postgres Service - To allow access to the DB from CMD
kubectl apply -f k8s/k8s-postgres-configmap.yml

Access to postgress kubernetes pod

kubectl exec -it [pod-name] --  psql -h localhost -U admin --password -p 5432 postgresdb

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author