version: "3.8" services: agentkit: build: . command: serve --host 0.0.0.0 --port 8001 ports: - "8001:8001" env_file: .env environment: - REDIS_URL=redis://redis:6379/0 - DATABASE_URL=postgresql+asyncpg://agentkit:agentkit@postgres:5432/agentkit depends_on: redis: condition: service_healthy postgres: condition: service_healthy healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8001/api/v1/health')"] interval: 30s timeout: 10s start_period: 30s retries: 3 restart: unless-stopped redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redisdata:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped postgres: image: pgvector/pgvector:pg15 ports: - "5432:5432" environment: POSTGRES_USER: agentkit POSTGRES_PASSWORD: agentkit POSTGRES_DB: agentkit volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U agentkit"] interval: 10s timeout: 5s retries: 5 restart: unless-stopped volumes: redisdata: pgdata: