A 12-factor counter microservice
Run somewhere
nc -l 2003
This is optional, used only if METRIC_HOST
and METRIC_PORT
is set.
Run somewhere
docker run --name gontador-redis -p 6379:6379 -d redis
go build -o gontador src/*.go
REDIS_URL=192.168.1.2:6379 METRIC_HOST=192.168.1.2 METRIC_PORT=2003 ./gontador
curl http://localhost:3000/counter
bash -xe deploy/deploy.sh
URL=`oc get route.route.openshift.io/gontador -o go-template --template={{.spec.host}}`
curl -v $URL/counter
oc delete all -l app=gontador
oc delete template gontador-template