# ReviewGate — the self-hosted client stack. It runs inside YOUR network. # The bot talks to your GitLab and to the model (a cloud one, possibly through a proxy, or a local # one). The code and the diff never go out and are never stored — only review metadata is. # # Quick start: # 1) Put an .env file next to this one and fill in the secrets (reference: https://reviewgate.dev/docs/install) # 2) docker compose up -d # 3) curl http://localhost:3000/api/health → {"status":"ok","ts":...,"version":"0.1.22"} # (version is the version of the running image; the tag below will not tell you: https://reviewgate.dev/docs/install#version) # 4) Diagnostics: curl -O https://reviewgate.dev/diagnose.sh && bash diagnose.sh # # The model is configured in .env. Anthropic, any OpenAI-compatible endpoint, Yandex AI Studio, # Ollama or vLLM — the provider reference: https://reviewgate.dev/docs/llm # # Postgres is optional (review metrics) — uncomment the block below along with DATABASE_URL. # The bot works fully without it. name: reviewgate services: app: # A public image from the ReviewGate registry (anonymous pull, no docker login needed). # Pin the tag to your version (latest is the newest stable one). # A mirror in case the registry is unreachable: novohudonossor/reviewgate-bot (Docker Hub). image: registry.reviewgate.dev/reviewgate-bot:latest env_file: - .env environment: PORT: '3000' # Inside the compose network the services are reachable by name. REDIS_HOST: redis REDIS_PORT: '6379' # How many reviews the worker runs in parallel (1..64, the default is 3). Raise it for a # large team's load; within that range the ceiling is the throughput of your model (a cloud # provider: its limits; local inference: Ollama serves one at a time, vLLM batches). # Reference: https://reviewgate.dev/docs/llm # REVIEW_CONCURRENCY: '3' # Enable this together with the postgres service below: # DATABASE_URL: postgres://reviewgate:${POSTGRES_PASSWORD:-reviewgate}@postgres:5432/reviewgate ports: # The port is needed so that GitLab can deliver webhooks and so that health/diagnose work. # If the bot sits behind your reverse proxy, proxy to this port. - '3000:3000' depends_on: redis: condition: service_healthy # postgres: # condition: service_healthy healthcheck: test: - CMD - node - -e - "fetch('http://127.0.0.1:3000/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))" interval: 30s timeout: 5s retries: 3 start_period: 20s restart: unless-stopped # --- A locked-down container: the bot is not root, the filesystem is read-only, privileges are # dropped. There is no ordinary way in; for diagnostics read the logs from outside — you never # need to go inside. read_only: true tmpfs: - /tmp # the only path the bot needs to write to at runtime cap_drop: - ALL security_opt: - no-new-privileges:true # Logs are written to the host (a read-only container does not prevent that) and rotated, so # they do not grow forever. # Read: docker compose logs -f app Dump: docker compose logs app > reviewgate.log # The logs hold review metadata only (models, severity, tokens). No code and no diffs. logging: driver: json-file options: max-size: '10m' max-file: '5' redis: # The review queue (BullMQ). Required: the webhook only enqueues a job, the worker does the work. image: redis:7-alpine command: ['redis-server', '--appendonly', 'yes'] volumes: - redis-data:/data healthcheck: test: ['CMD', 'redis-cli', 'ping'] interval: 10s timeout: 3s retries: 5 restart: unless-stopped # Optional: review metrics. It stores metadata only (no code, no diffs). # The bot works without this service — the metrics are simply off. # postgres: # image: postgres:16-alpine # environment: # POSTGRES_USER: reviewgate # POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-reviewgate} # POSTGRES_DB: reviewgate # volumes: # - postgres-data:/var/lib/postgresql/data # healthcheck: # test: ['CMD-SHELL', 'pg_isready -U reviewgate -d reviewgate'] # interval: 10s # timeout: 3s # retries: 5 # restart: unless-stopped volumes: redis-data: # postgres-data: