# dev-multinode - Auto-generated Docker Compose Template

> ! **Auto-generated**: This directory and its contents are automatically generated by `docker/template/`. Do not edit these files directly as your changes will be overwritten.

## Overview

This Docker Compose configuration provides a complete development environment for Rivet with the following services:

- **Rivet Engine**: Main orchestration service
- **Rivet Shell**: Interactive shell for debugging
- **Runner**: Executes user code
- **ClickHouse**: Analytics and time-series database
- **PostgreSQL**: Relational database
- **Vector Server**: Log aggregation and processing
- **OpenTelemetry Collector**: Observability data collection

## Port Configuration

| Service | Port(s) | Description |
|---------|---------|-------------|
| Rivet Engine | 6420 | Public endpoint |
| Runner | 5050 | Code execution service |
| PostgreSQL | 5432 | Database |
| ClickHouse HTTP | 9300 | Database HTTP interface |
| ClickHouse Native | 9301 | Database native protocol |
| OpenTelemetry gRPC | 4317 | OTLP gRPC endpoint |
| OpenTelemetry HTTP | 4318 | OTLP HTTP endpoint |

## Template Configuration

**Template Name**: `dev-multinode`  
**Base Port**: `6420`  
**Network Mode**: `bridge`

### Datacenters
- **1**: 3 engine(s), 3 runner(s)

## Usage

1. Start all services:
   ```bash
   docker-compose up -d
   ```

2. Check service health:
   ```bash
   docker-compose ps
   ```

3. View logs:
   ```bash
   docker-compose logs -f [service-name]
   ```

4. Stop all services:
   ```bash
   docker-compose down
   ```

## Generated Files

This template generates the following files and directories:
- `docker-compose.yml` - Main Docker Compose configuration
- `core/` - Core services shared across datacenters:
  - `clickhouse/` - ClickHouse configuration and initialization
  - `vector-server/` - Vector aggregator configuration  
  - `otel-collector-server/` - OpenTelemetry Collector server configuration
- `datacenters/` - Datacenter-specific configurations:
  - `1/` - Configuration for datacenter 1:
    - `postgres/` - PostgreSQL setup scripts
    - `rivet-engine/` - Rivet Engine configuration
    - `vector-client/` - Vector client configuration
    - `otel-collector-client/` - OpenTelemetry Collector client configuration
- `README.md` - This file
