Ctrl K
ComunidadGuías…

docker/dev/docker-compose.yaml

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

Archivo original ↗Preguntar a KiBot
services:
  checkmate:
    build:
      context: ../..
      dockerfile: docker/Dockerfile
    restart: always
    ports:
      - "52345:52345"
    env_file:
      - server.env
    environment:
      LOG_LEVEL: "debug"
      # TELEMETRY_ENABLED: "false"
    depends_on:
      mongodb:
        condition: service_healthy
  worker:
    build:
      context: ../..
      dockerfile: docker/Dockerfile
    restart: always
    ports:
      - "52346:52346"
    env_file:
      - server.env
    environment:
      QUEUE_MODE: "worker"
      HEALTH_PORT: "52346"
      LOG_LEVEL: "debug"
      # TELEMETRY_ENABLED: "false"
    stop_grace_period: 30s
    healthcheck:
      test:
        [
          "CMD",
          "node",
          "-e",
          "require('http').get('http://localhost:52346/livez',r=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))",
        ]
      interval: 15s
      timeout: 3s
      retries: 3
    depends_on:
      mongodb:
        condition: service_healthy
  mongodb:
    image: mongo:8.0
    restart: always
    ports:
      - "27017:27017"
    command: ["mongod", "--quiet", "--bind_ip_all"]
    volumes:
      - ./mongo/data:/data/db
    healthcheck:
      test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/27017"]
      interval: 5s
      timeout: 30s
      start_period: 0s
      start_interval: 1s
      retries: 30