🚀 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 run
docker build -t go-init .
docker run -p 8080:8080 go-init
Or use Docker Compose:
docker-compose up --build
App 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 /healthz
Returns 200 OK
with body ok
.
GET /metrics
Prometheus-compatible metrics including:
http_requests_total
http_request_duration_seconds