🚀 A production-ready Golang microservice starter kit.
cmd/- Entrypoint binariesinternal/- Internal application logicpkg/- Shared packages (e.g., logger)configs/- Configuration filesdeployments/- Docker, K8s manifestsscripts/- Dev or CI automationvendor/- Vendored dependencies (if usinggo mod vendor)
make rundocker build -t go-init .
docker run -p 8080:8080 go-initOr use Docker Compose:
docker-compose up --buildApp will be available at http://localhost:8080
Prometheus is included and scrapes metrics from /metrics.
- Prometheus UI: http://localhost:9090
- App metrics: http://localhost:8080/metrics
Settings are loaded from a .env file.
PORT=8080
LOG_LEVEL=debug
GET /healthzReturns 200 OK with body ok.
GET /metricsPrometheus-compatible metrics including:
http_requests_totalhttp_request_duration_seconds