# README
go-base
Base template for other go projects
Requirements
Docker (+ Compose)
Kubernetes (+ Kompose)
- https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/
- https://computingforgeeks.com/how-to-install-minikube-on-ubuntu-debian-linux/
- https://kubernetes.io/docs/tasks/configure-pod-container/translate-compose-kubernetes/
Rabbit
PgBouncer
- https://www.compose.com/articles/how-to-pool-postgresql-connections-with-pgbouncer/
- https://hub.docker.com/r/edoburu/pgbouncer
psql postgres://postgres-dev:password@localhost/pgbouncer
Vegeta
Running
docker-compose up --build
Using K8s
- Update run
kompose convert
to update the k8s files - Update files and also the
kube-apply
section in theMakefile
with the latest k8s files - run
make kube-start
(if it's not running yet) - Login to your docker account
- run
make kube-apply
- run
make kube-list
to list out the service running - use the returned
URL
accordingly
Sample Curl
curl --location --request GET 'http://localhost:8080/token'
curl --location --request GET 'http://localhost:8080/secure/v1/user/list' \
--header 'token: TOKEN'
curl -X POST -F 'username=linuxize' -F '[email protected]' -F 'password=dummy' http://localhost:8080/v2/user/register