services: postgres: image: postgres:16 ports: - "5432:5432" environment: - POSTGRES_USER=${POSTGRES_USER:-postgres} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} - POSTGRES_DB=${POSTGRES_DB:-agent_service} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"] interval: 5s timeout: 5s retries: 5 agent_service: build: context: . dockerfile: docker/Dockerfile.service ports: - "8080:8080" env_file: - .env depends_on: postgres: condition: service_healthy healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/info"] interval: 5s timeout: 5s retries: 5 # Volume mount of development-only credentials since compose watch doesn't sync ignored files and doesn't do initial sync when the service starts volumes: - ./privatecredentials:/privatecredentials develop: watch: - path: src/agents/ action: sync+restart target: /app/agents/ - path: src/schema/ action: sync+restart target: /app/schema/ - path: src/service/ action: sync+restart target: /app/service/ - path: src/core/ action: sync+restart target: /app/core/ - path: src/memory/ action: sync+restart target: /app/memory/ streamlit_app: build: context: . dockerfile: docker/Dockerfile.app ports: - "8501:8501" depends_on: - agent_service healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8501/healthz"] interval: 5s timeout: 5s retries: 5 environment: - AGENT_URL=http://agent_service:8080 develop: watch: - path: src/client/ action: sync+restart target: /app/client/ - path: src/schema/ action: sync+restart target: /app/schema/ - path: src/streamlit_app.py action: sync+restart target: /app/streamlit_app.py volumes: postgres_data: