This is an example of the REST API app using golang and postgres, deployable on kubernetes.
To run an app using your local environment:
- build the application using makefile commands (build/build_mac/build_windows)
- inject env variables using example.env file as an example of required variables
- use command
./companies migrate upto run migrations
To run an app in kubernetes execute this command below:
kubectl apply -f k8s/postgres/postgres-configmap.yaml
kubectl apply -f k8s/postgres/postgres-storage.yaml
kubectl apply -f k8s/postgres/postgres-deployment.yaml
kubectl apply -f k8s/postgres/postgres-service.yaml
kubectl apply -f k8s/companies/companies-configmap.yaml
kubectl apply -f k8s/companies/companies-deployment.yaml
kubectl apply -f k8s/companies/companies-service.yaml
App exposes 3000 port by default