# docker-compose.yml # Used for "clone & run" deployment scenario # Started by ./start.sh with auto-generated .env services: postgres: container_name: airweave-db image: postgres:16 # Uses variables from .env with fallbacks environment: POSTGRES_DB: ${POSTGRES_DB:-airweave} POSTGRES_USER: ${POSTGRES_USER:-airweave} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-airweave1234!} command: - "postgres" - "-c" - "max_connections=200" - "-c" - "shared_buffers=256MB" - "-c" - "effective_cache_size=1GB" ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-airweave}" ] interval: 5s timeout: 5s retries: 5 redis: container_name: airweave-redis image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: [ "CMD", "redis-cli", "ping" ] interval: 5s timeout: 5s retries: 5 backend: container_name: airweave-backend # Use pre-built image of latest release, or override with BACKEND_IMAGE env var for testing image: ${BACKEND_IMAGE:-ghcr.io/airweave-ai/airweave-backend:latest} # Import all variables from .env file env_file: - ../.env ports: - "8001:8001" volumes: - ../backend:/app # These variables override any from .env file # Required for container networking (services refer to container names, not localhost) environment: # Override any localhost references for container networking - POSTGRES_HOST=postgres - REDIS_HOST=redis - QDRANT_HOST=qdrant - QDRANT_PORT=6333 - TEXT2VEC_INFERENCE_URL=http://text2vec-transformers:8080 # Environment configuration (can be overridden in .env) - ENVIRONMENT=${ENVIRONMENT:-local} - LOCAL_DEVELOPMENT=${LOCAL_DEVELOPMENT:-true} # Temporal configuration - TEMPORAL_HOST=temporal - TEMPORAL_PORT=7233 - TEMPORAL_NAMESPACE=default - TEMPORAL_ENABLED=true - AUTH_ENABLED=false depends_on: postgres: condition: service_healthy redis: condition: service_healthy qdrant: condition: service_healthy healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:8001/health" ] interval: 10s timeout: 30s retries: 10 start_period: 60s restart: on-failure frontend: container_name: airweave-frontend # Use pre-built image of latest release, or override with FRONTEND_IMAGE env var for testing image: ${FRONTEND_IMAGE:-ghcr.io/airweave-ai/airweave-frontend:latest} # Profile: only start if explicitly enabled with --profile frontend # Not needed for backend-only testing (API tests, connector tests) profiles: - frontend ports: - "${FRONTEND_LOCAL_DEVELOPMENT_PORT:-8080}:8080" environment: - API_URL=http://localhost:8001 - ENABLE_AUTH=false depends_on: backend: condition: service_healthy healthcheck: test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8080" ] interval: 30s timeout: 10s retries: 3 restart: on-failure text2vec-transformers: container_name: airweave-embeddings image: semitechnologies/transformers-inference:sentence-transformers-all-MiniLM-L6-v2 # Profile: only start if explicitly enabled with --profile local-embeddings # By default, backend uses OpenAI embeddings when OPENAI_API_KEY is set profiles: - local-embeddings ports: - "9878:8080" environment: ENABLE_CUDA: 0 WORKERS_PER_NODE: 1 healthcheck: test: [ "CMD", "wget", "--spider", "-q", "http://localhost:8080/health" ] interval: 30s timeout: 10s retries: 3 restart: on-failure qdrant: container_name: airweave-qdrant image: qdrant/qdrant:latest command: bash -c "apt-get update && apt-get install -y curl && ./entrypoint.sh" # we need to install curl to check health ports: - "6333:6333" volumes: - qdrant_data:/qdrant/storage healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:6333/healthz" ] interval: 10s timeout: 5s retries: 3 restart: on-failure temporal: container_name: airweave-temporal image: temporalio/auto-setup:1.24.2 ports: - "7233:7233" - "8233:8233" environment: - DB=postgres12 - DB_PORT=5432 - POSTGRES_USER=${POSTGRES_USER:-airweave} - POSTGRES_PWD=${POSTGRES_PASSWORD:-airweave1234!} - POSTGRES_SEEDS=postgres - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml volumes: - ./temporal-config:/etc/temporal/config/dynamicconfig depends_on: postgres: condition: service_healthy healthcheck: test: [ "CMD", "tctl", "--address", "temporal:7233", "workflow", "list" ] interval: 30s timeout: 10s retries: 5 restart: on-failure temporal-ui: container_name: airweave-temporal-ui image: temporalio/ui:2.26.2 ports: - "8088:8080" environment: - TEMPORAL_ADDRESS=temporal:7233 - TEMPORAL_CORS_ORIGINS=http://localhost:3000 depends_on: temporal: condition: service_healthy restart: on-failure temporal-worker: container_name: airweave-temporal-worker # Use pre-built image of latest release, or override with BACKEND_IMAGE env var for testing image: ${BACKEND_IMAGE:-ghcr.io/airweave-ai/airweave-backend:latest} # Import all variables from .env file (same as backend) env_file: - ../.env environment: # Override any localhost references for container networking - POSTGRES_HOST=postgres - REDIS_HOST=redis - QDRANT_HOST=qdrant - QDRANT_PORT=6333 - TEXT2VEC_INFERENCE_URL=http://text2vec-transformers:8080 # Environment configuration (can be overridden in .env) - ENVIRONMENT=${ENVIRONMENT:-local} - LOCAL_DEVELOPMENT=${LOCAL_DEVELOPMENT:-true} # Temporal configuration - TEMPORAL_HOST=temporal - TEMPORAL_PORT=7233 - TEMPORAL_NAMESPACE=default - TEMPORAL_TASK_QUEUE=airweave-sync-queue - TEMPORAL_ENABLED=true volumes: - ../backend:/app entrypoint: [ "python", "-m", "airweave.platform.temporal.worker" ] depends_on: postgres: condition: service_healthy temporal: condition: service_healthy restart: on-failure volumes: postgres_data: redis_data: qdrant_data: