This repository contains Docker Compose configurations for running the infrastructure services required by Minisource microservices.
| Service | Port | Description |
|---|---|---|
| PostgreSQL | 5432 | Primary database |
| Redis | 6379 | Caching and session storage |
| Jaeger | 16686 | Distributed tracing UI |
| Prometheus | 9090 | Metrics collection |
| Grafana | 3000 | Visualization dashboards |
| Loki | 3100 | Log aggregation |
| OpenTelemetry Collector | 4317 (gRPC), 4318 (HTTP) | Telemetry collection |
# Copy environment file
cp .env.example .env
# Start all services
docker-compose up -d
# Check status
docker-compose ps
# View logs
docker-compose logs -f- Jaeger UI: http://localhost:16686
- Grafana: http://localhost:3000 (admin/admin123)
- Prometheus: http://localhost:9090
Add these environment variables to your services:
OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
OTEL_SERVICE_NAME=your-service-nameDB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=your_db_nameREDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=redis123infra/
├── docker-compose.yml # Main compose file
├── .env.example # Environment template
├── config/
│ ├── otel-collector-config.yaml
│ ├── prometheus.yml
│ ├── loki-config.yaml
│ ├── promtail-config.yaml
│ └── grafana/
│ ├── provisioning/
│ │ ├── datasources/
│ │ └── dashboards/
│ └── dashboards/
└── scripts/
└── init-multiple-dbs.sh # PostgreSQL init script
docker-compose up -d postgres redisdocker-compose up -ddocker-compose up -d postgres redis jaeger prometheus grafana otel-collectorData is persisted in named volumes:
minisource-postgres-dataminisource-redis-dataminisource-jaeger-dataminisource-prometheus-dataminisource-grafana-dataminisource-loki-data
To reset all data:
docker-compose down -vAll services are connected to minisource-network bridge network. This allows services to communicate using container names as hostnames.
Pre-configured dashboards are available:
- Minisource Overview: Request rates, response times, error rates
docker-compose ps
docker-compose logs <service-name>docker-compose restart <service-name>curl http://localhost:13133/ # Health check
curl http://localhost:8888/metrics # Collector metricsdocker exec -it minisource-postgres psql -U postgresdocker exec -it minisource-redis redis-cli -a redis123