Skip to content

Docker Development Guide

The RIVORA Framework includes Docker Compose configurations for running the full infrastructure stack locally.

Docker Compose Files

FilePurpose
docker-compose.dev.ymlCore services (SQL Server, PostgreSQL, Redis, RabbitMQ, etc.)
infra/docker-compose.dev.ymlObservability stack (Loki, Tempo, Prometheus, Grafana, OTEL Collector)

Starting the Full Stack

Core Services

bash
docker compose -f docker-compose.dev.yml up -d

This starts:

ServicePortDescription
SQL Server1433Primary database
PostgreSQL5432Alternative database
Redis6379Caching and rate limiting
RabbitMQ5672 / 15672Messaging / Management UI
Prometheus9090Metrics collection
Grafana3000Dashboards
Jaeger4317 / 16686Distributed tracing / UI
Seq5341 / 8081Structured log viewer
Elasticsearch9200Full-text search / logs
Kibana5601Elasticsearch dashboard

Observability Stack

bash
docker compose -f infra/docker-compose.dev.yml up -d

This starts the advanced observability pipeline:

ServicePortDescription
Loki3100Log aggregation
Tempo3200Distributed tracing
OTEL Collector4317 / 4318OpenTelemetry pipeline
Prometheus9090Metrics
Grafana3000Unified dashboard

Connecting to Services

SQL Server

Server=localhost,1433;Database=RVRFrameworkDb;User Id=sa;Password=RVR_Dev_P@ssw0rd!;TrustServerCertificate=True

appsettings.Development.json:

json
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost,1433;Database=RVRFrameworkDb;User Id=sa;Password=RVR_Dev_P@ssw0rd!;TrustServerCertificate=True"
  }
}

PostgreSQL

Host=localhost;Port=5432;Database=RVRFrameworkDb;Username=kba;Password=kba_dev_password

appsettings.Development.json:

json
{
  "ConnectionStrings": {
    "DefaultConnection": "Host=localhost;Port=5432;Database=RVRFrameworkDb;Username=kba;Password=kba_dev_password"
  }
}

Redis

json
{
  "Redis": {
    "ConnectionString": "localhost:6379"
  }
}

RabbitMQ

json
{
  "RabbitMQ": {
    "HostName": "localhost",
    "Port": 5672,
    "UserName": "kba",
    "Password": "kba_dev_password"
  }
}

Management UI: http://localhost:15672 (login: kba / kba_dev_password)

Service Management

Check service status

bash
docker compose -f docker-compose.dev.yml ps

View logs

bash
# All services
docker compose -f docker-compose.dev.yml logs -f

# Specific service
docker compose -f docker-compose.dev.yml logs -f redis

Stop all services

bash
docker compose -f docker-compose.dev.yml down

Reset data (remove volumes)

bash
docker compose -f docker-compose.dev.yml down -v

Accessing Dashboards

DashboardURLCredentials
Grafanahttp://localhost:3000admin / admin
RabbitMQhttp://localhost:15672kba / kba_dev_password
Jaeger UIhttp://localhost:16686None
Seqhttp://localhost:8081None
Kibanahttp://localhost:5601None
Prometheushttp://localhost:9090None

Running the API with Docker Services

Start the infrastructure, then run the API:

bash
# 1. Start infrastructure
docker compose -f docker-compose.dev.yml up -d

# 2. Wait for health checks to pass
docker compose -f docker-compose.dev.yml ps

# 3. Run the API
cd src/api/RVR.Framework.Api
dotnet run

The API will be available at http://localhost:5220.

Health Checks

Verify services are healthy:

bash
# SQL Server
docker compose -f docker-compose.dev.yml exec sqlserver /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "RVR_Dev_P@ssw0rd!" -Q "SELECT 1" -C

# Redis
docker compose -f docker-compose.dev.yml exec redis redis-cli ping

# Elasticsearch
curl http://localhost:9200/_cluster/health

# RabbitMQ
curl -u kba:kba_dev_password http://localhost:15672/api/overview

Troubleshooting

Port conflicts

If a port is already in use, modify the port mapping in docker-compose.dev.yml:

yaml
services:
  redis:
    ports:
      - "6380:6379"  # Map to 6380 on host

SQL Server on ARM/Mac

SQL Server does not have native ARM images. Use Azure SQL Edge instead:

yaml
services:
  sqlserver:
    image: mcr.microsoft.com/azure-sql-edge:latest
    environment:
      ACCEPT_EULA: "Y"
      MSSQL_SA_PASSWORD: "RVR_Dev_P@ssw0rd!"
    ports:
      - "1433:1433"

Insufficient memory

If containers crash due to memory, increase Docker's memory allocation to at least 4 GB in Docker Desktop settings. For Elasticsearch, the compose file limits JVM heap to 512 MB:

yaml
environment:
  - "ES_JAVA_OPTS=-Xms512m -Xmx512m"

Released under the MIT License.