version: '3.8' services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: agentmesh POSTGRES_USER: agentmesh POSTGRES_PASSWORD: agentmesh ports: ["5432:5432"] volumes: ["postgres_data:/var/lib/postgresql/data"] healthcheck: test: ["CMD-SHELL", "pg_isready -U agentmesh -d agentmesh"] interval: 5s timeout: 5s retries: 10 redis: image: redis:7-alpine ports: ["6379:6379"] volumes: ["redis_data:/data"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 10 backend: build: context: ./backend dockerfile: Dockerfile environment: DATABASE_URL: postgresql+asyncpg://agentmesh:agentmesh@postgres:5432/agentmesh REDIS_URL: redis://redis:6379/0 SECRET_KEY: dev-secret-change-in-production ENVIRONMENT: development ports: ["8000:8000"] depends_on: postgres: condition: service_healthy redis: condition: service_healthy volumes: - ./backend:/app command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload worker: build: context: ./backend dockerfile: Dockerfile environment: DATABASE_URL: postgresql+asyncpg://agentmesh:agentmesh@postgres:5432/agentmesh REDIS_URL: redis://redis:6379/0 SECRET_KEY: dev-secret-change-in-production ENVIRONMENT: development depends_on: postgres: condition: service_healthy redis: condition: service_healthy volumes: - ./backend:/app command: celery -A app.workers.celery_app worker --loglevel=info --concurrency=4 frontend: build: context: ./frontend dockerfile: Dockerfile ports: ["3000:3000"] environment: VITE_API_URL: http://localhost:8000 VITE_WS_URL: ws://localhost:8000 volumes: - ./frontend:/app - /app/node_modules command: npm run dev -- --host 0.0.0.0 volumes: postgres_data: redis_data: