Ctrl K
ComunidadGuías…

docker-compose.yml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
# Full stack:        docker compose up -d          → http://localhost:3000/app
# Build from source: docker compose up -d --build
# Contributors:      docker compose up -d postgres minio, then `go run .`
# Production:        put overrides in a .env file next to this one (see README)

services:

  byot:
    image: ghcr.io/alexanderritik/byot:${BYOT_VERSION:-latest}
    build: .
    ports:
      # Set BYOT_LISTEN=127.0.0.1:3000 when a reverse proxy runs on this host.
      - "${BYOT_LISTEN:-3000}:3000"
    environment:
      - STORAGE_PROVIDER=minio
      - MINIO_ENDPOINT=minio:9000
      - MINIO_ACCESS_KEY=minioadmin
      - MINIO_SECRET_KEY=${MINIO_ROOT_PASSWORD:-minioadmin}
      - MINIO_BUCKET=byot
      - DB_URL=postgres://${POSTGRES_USER:-byot}:${POSTGRES_PASSWORD:-byot}@postgres:5432/${POSTGRES_DB:-byot}?sslmode=disable
      # Must match the bind mount below (same path on host and container).
      - WORKSPACE_DIR=/tmp/byot-runs
      - SECRETS_KEY=${SECRETS_KEY:-}
      - WORKER_CONCURRENCY=${WORKER_CONCURRENCY:-3}
      # Sign-in for the dashboard and API; empty disables auth.
      - SUPABASE_URL=${SUPABASE_URL:-}
      - SUPABASE_PUBLISHABLE_KEY=${SUPABASE_PUBLISHABLE_KEY:-}
      # PagerDuty EU accounts: https://events.eu.pagerduty.com/v2/enqueue
      - PAGERDUTY_EVENTS_URL=${PAGERDUTY_EVENTS_URL:-}
    volumes:
      # Tests run as sibling containers on the host's docker daemon.
      - /var/run/docker.sock:/var/run/docker.sock
      # The daemon mounts run workspaces by host path, so the path must be
      # identical inside and outside this container.
      - /tmp/byot-runs:/tmp/byot-runs
    depends_on:
      postgres:
        condition: service_healthy
      minio:
        condition: service_healthy
    restart: unless-stopped

  minio:
    image: cgr.dev/chainguard/minio:latest
    command: server /data --console-address ":9001"
    ports:
      # Localhost only: BYOT reaches MinIO over the compose network.
      - "127.0.0.1:9000:9000"
      - "127.0.0.1:9001:9001"
    environment:
      - MINIO_ROOT_USER=minioadmin
      - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioadmin}
    volumes:
      - minio_data:/data
    healthcheck:
      test: ["CMD", "mc", "ready", "local"]
      interval: 2s
      timeout: 5s
      retries: 30

  postgres:
    image: postgres:16-alpine
    ports:
      # Localhost only, for `go run .` during development.
      - "127.0.0.1:5432:5432"
    environment:
      # Applied only when the volume is first created. Installs from 0.1.0
      # set POSTGRES_USER=fnx and POSTGRES_DB=fnx in .env to keep their data
      # (and POSTGRES_PASSWORD=fnx if they never set their own).
      - POSTGRES_USER=${POSTGRES_USER:-byot}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-byot}
      - POSTGRES_DB=${POSTGRES_DB:-byot}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
      interval: 2s
      timeout: 5s
      retries: 30

volumes:
  minio_data:
  postgres_data: