Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

4.6 KB
Raw Blame
networks:
  app-network:
    name: app-network
  shared-network:
    name: shared-network

volumes:
  clamav-data:
  workspace-data:
  store-media-data:
  falkordb_data:

x-agpt-services:
  &agpt-services
  networks:
    - app-network
    - shared-network


services:
  # AGPT services
  migrate:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: migrate

  publish_skills:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: publish_skills

  redis-0:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: redis-0

  redis-1:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: redis-1

  redis-2:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: redis-2

  redis-init:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: redis-init

  falkordb:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: falkordb

  rabbitmq:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: rabbitmq

  rest_server:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: rest_server

  executor:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: executor

  copilot_executor:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: copilot_executor

  websocket_server:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: websocket_server

  database_manager:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: database_manager

  scheduler_server:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: scheduler_server

  notification_server:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: notification_server

  platform_linking_manager:
    <<: *agpt-services
    profiles: ["bot"]
    extends:
      file: ./docker-compose.platform.yml
      service: platform_linking_manager

  clamav:
    <<: *agpt-services
    image: clamav/clamav-debian:latest
    ports:
      - "3310:3310"
    volumes:
      - clamav-data:/var/lib/clamav
    environment:
      - CLAMAV_NO_FRESHCLAMD=false
      - CLAMD_CONF_StreamMaxLength=50M
      - CLAMD_CONF_MaxFileSize=100M
      - CLAMD_CONF_MaxScanSize=100M
      - CLAMD_CONF_MaxThreads=12
      - CLAMD_CONF_ReadTimeout=300
      - CLAMD_CONF_TCPAddr=0.0.0.0
    healthcheck:
      test: ["CMD-SHELL", "clamdscan --version || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 3

  frontend:
    <<: *agpt-services
    extends:
      file: ./docker-compose.platform.yml
      service: frontend

  # db waits on rabbitmq:service_healthy to gate startup ordering:
  # concurrent container creation in E2B's Docker races RabbitMQ's
  # .erlang.cookie write, producing `eacces` at broker boot. migrate and the
  # backend services all depends_on db:service_healthy, so gating db alone
  # cascades to the rest of the stack.
  db:
    <<: *agpt-services
    # Pinned to pg15 to track the managed Postgres major that prod and dev
    # run; testing on a newer major than production is skew we don't want.
    image: pgvector/pgvector:pg15
    restart: unless-stopped
    ports:
      - 5432:5432
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: your-super-secret-and-long-postgres-password
      POSTGRES_DB: postgres
    volumes:
      # Creates the platform schema + the legacy auth.users shim that
      # historical Prisma migrations reference. Only runs on a fresh volume.
      - ./db/init/00-init.sql:/docker-entrypoint-initdb.d/00-init.sql:ro
      - ./data/db/data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "postgres", "-h", "localhost"]
      interval: 5s
      timeout: 5s
      retries: 10
    depends_on:
      rabbitmq:
        condition: service_healthy

  deps:
    <<: *agpt-services
    profiles:
      - local
    image: busybox
    command: /bin/true
    depends_on:
      - db
      - redis-0
      - redis-1
      - redis-2
      - redis-init
      - rabbitmq
      - clamav
      - falkordb
      - migrate

  deps_backend:
    <<: *agpt-services
    profiles:
      - local
    image: busybox
    command: /bin/true
    depends_on:
      - deps
      - rest_server
      - executor
      - copilot_executor
      - websocket_server
      - database_manager
      - scheduler_server