version: '3.8' services: postgres: image: timescale/timescaledb:latest-pg15 container_name: agentops-postgres environment: POSTGRES_DB: agentops_dev POSTGRES_USER: postgres POSTGRES_PASSWORD: password ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 networks: - agentops-network redis: image: redis:7-alpine container_name: agentops-redis ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 networks: - agentops-network keycloak: image: quay.io/keycloak/keycloak:23.0 container_name: agentops-keycloak environment: KEYCLOAK_ADMIN: admin KEYCLOAK_ADMIN_PASSWORD: admin KC_DB: postgres KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak KC_DB_USERNAME: postgres KC_DB_PASSWORD: password KC_HOSTNAME: localhost KC_HTTP_ENABLED: true ports: - "8180:8080" depends_on: postgres: condition: service_healthy command: start-dev healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/health/ready"] interval: 30s timeout: 10s retries: 5 networks: - agentops-network spring-boot: build: . container_name: agentops-spring-boot environment: SPRING_PROFILES_ACTIVE: dev SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/agentops_dev SPRING_DATASOURCE_USERNAME: postgres SPRING_DATASOURCE_PASSWORD: password SPRING_DATA_REDIS_HOST: redis SPRING_DATA_REDIS_PORT: 6379 KEYCLOAK_ISSUER_URI: http://keycloak:8080/realms/agentops KEYCLOAK_JWK_SET_URI: http://keycloak:8080/realms/agentops/protocol/openid-connect/certs ports: - "8080:8080" depends_on: postgres: condition: service_healthy redis: condition: service_healthy keycloak: condition: service_healthy networks: - agentops-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"] interval: 30s timeout: 10s retries: 5 start_period: 60s otel-collector: image: otel/opentelemetry-collector-contrib:latest container_name: agentops-otel-collector command: ["--config=/etc/otel-collector-config.yaml"] volumes: - ./otel-collector-config-spring.yaml:/etc/otel-collector-config.yaml:ro ports: - "4317:4317" # OTLP gRPC receiver - "4318:4318" # OTLP HTTP receiver - "13133:13133" # Health check extension depends_on: spring-boot: condition: service_healthy networks: - agentops-network healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost:13133"] interval: 10s timeout: 5s retries: 5 networks: agentops-network: driver: bridge volumes: postgres_data: redis_data: