version: "3.8" services: # PostgreSQL with pgvector (for local development) db: image: pgvector/pgvector:pg16 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: conai ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data # Backend backend: build: context: ./backend dockerfile: Dockerfile env_file: ./backend/.env ports: - "8000:8000" depends_on: - db volumes: - ./backend:/app command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload # Frontend frontend: build: context: ./frontend dockerfile: Dockerfile environment: NEXT_PUBLIC_API_URL: http://localhost:8000 ports: - "3000:3000" volumes: - ./frontend:/app - /app/node_modules - /app/.next command: npm run dev volumes: postgres_data: