๐ A production-ready Go Fiber microservices template with multiple deployment options, featuring Redis clustering, MySQL database, comprehensive monitoring, and observability solutions.
This repository provides a complete microservices stack built with Go Fiber that can be deployed using either:
- ๐ณ Docker Compose - For local development and simple deployments
- โธ๏ธ Kubernetes with Helm - For production-ready cloud deployments
- Go Fiber API Gateway - High-performance HTTP framework with built-in middleware
- Redis Cluster - Master-slave replication with Redis Sentinel for high availability
- MySQL Database - Relational database with GORM ORM integration
- Comprehensive Monitoring Stack:
- Prometheus - Metrics collection and monitoring
- Grafana - Data visualization and dashboards
- Loki & Promtail - Log aggregation and querying (Kubernetes only)
- Redis Insight - Redis GUI for database management
- Go Swagger Documentation - Auto-generated API documentation
- Prometheus Auto Service Discovery - Automatic service monitoring (Kubernetes only)
Choose your deployment method:
Perfect for local development, testing, and simple deployments.
๐ Click here for Docker Compose Documentation
# Quick start with Docker Compose
git clone https://github.com/XDcobra/gofiber-starter-stack.git
cd gofiber-starter-stack
make docker-startEnterprise-ready deployment with advanced features like log aggregation and auto service discovery.
๐ Click here for Kubernetes/Helm Documentation
# Quick start with Kubernetes
git clone https://github.com/XDcobra/gofiber-starter-stack.git
cd gofiber-starter-stack/charts/gofiber-starter-stack
helm install gofiber-starter-stack .โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ API Gateway โ โ Grafana โ โ Prometheus โ
โ (Go Fiber) โ โ (Port 3000) โ โ (Port 9090) โ
โ (Port 8000) โ โ โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Redis Cluster โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Master โ โ Slave โ โSentinel1โ โSentinel2โ โ
โ โ (6379) โ โ (6379) โ โ (26379) โ โ (26380) โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โ
โ โSentinel3โ โRedis โ โ
โ โ(26381) โ โInsight โ โ
โ โโโโโโโโโโโ โ(5540) โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MySQL Database โ
โ (Port 3306) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Loki & Promtail โ
โ (Kubernetes Only) โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Loki โ โPromtail1โ โPromtail2โ โ
โ โ (3100) โ โ โ โ โ โ
โ โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Docker and Docker Compose
- Go 1.24.4 or higher
- Git
- Kubernetes cluster (minikube, kind, or cloud provider)
- Helm 3.x
- kubectl configured
- Ingress controller (nginx-ingress recommended)
GET /- API health check
GET /redis/ping- Redis connection testGET /redis/get- Get value from RedisPOST /redis/post- Set value in Redis
GET /mysql/get/:id- Get record by IDPOST /mysql/post- Create new record
GET /swagger/*- Swagger API documentationGET /metrics- Prometheus metrics endpoint
Both deployment methods include:
- Authentication for monitoring dashboards (Prometheus, Grafana)
- Database security with configurable credentials
- Service isolation and network security
- Environment-based configuration management
- Prometheus metrics collection
- Grafana dashboards
- Basic logging
- Enhanced monitoring with auto service discovery
- Centralized logging with Loki & Promtail
- Advanced dashboards and alerting
- Service mesh ready architecture
- Suitable for small to medium deployments
- Easy to set up and maintain
- Good for development and testing environments
- Enterprise-grade scalability and reliability
- Auto-scaling and load balancing
- Advanced monitoring and logging
- Multi-environment support (dev, staging, prod)
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Go Fiber - Fast HTTP framework
- GORM - Go ORM library
- Redis - In-memory data store
- Prometheus - Monitoring system
- Grafana - Data visualization
- Loki - Log aggregation
- Helm - Kubernetes package
- Go Swagger - Swagger for GoFiber
If you have any questions or need help, please open an issue on GitHub.