TBD
TBD
- 12-factor app compliant
- Inteligent health checks (readiness and liveness) - they are checking connection to DB as well
- Graceful shutdown on interrupt signals
- Instrumented with Prometheus
- Structured logging with zap
- Layered docker builds
- Multi-stage docker builds
- Repository for connecting PostgresDB
- Swagger docs available under
/swaggerendpoint
GET/version returns information about app version, last commiter, etcGET/metrics returns metrics for prometheus purposeGET/health returns liveness probeGET/ready returns readiness probeGET/swagger.json returns the API Swagger docs, used for Linkerd service profiling and Gloo routes discovery
You need to have working go environment:
- Install
go- https://golang.org/dl/ - Have working
make- https://www.gnu.org/software/make/ - Install
docker- https://docs.docker.com/install/ - Install
golangci-lint- https://github.com/golangci/golangci-lint - Install
swag- https://github.com/swaggo/swag - Install
misspell- https://github.com/client9/misspell - [For local development] Install
docker-compose- https://docs.docker.com/compose/install/
A step by step series of examples how to get a development env running:
Run docker-compose with all required components:
docker-compose up -d postgresAnd run application locally:
make runOr with docker-compose:
docker-compose up -d applicationNow you can go to http://localhost:8080/swagger/ and check whether it's working.
make testmake lintTo build, pack binary into Docker image and push it into dockerhub.com:
make releasekubectl apply -k github.com/mateuszdyminski/go-template/kustomizemake buildWe use SemVer for versioning. For the versions available, see the tags on this repository.
TBD
MIT
TBD