services: # ===================================== # Core Infrastructure Services # ===================================== postgres: image: postgres:15 container_name: pipeline_postgres environment: POSTGRES_USER: pipeline_admin POSTGRES_PASSWORD: secure_pipeline_2024 POSTGRES_DB: dev_pipeline volumes: - postgres_data:/var/lib/postgresql/data - ./databases/scripts/init.sql:/docker-entrypoint-initdb.d/init.sql ports: - "5432:5432" networks: - pipeline_network healthcheck: test: ["CMD-SHELL", "pg_isready -U pipeline_admin -d dev_pipeline"] interval: 30s timeout: 10s retries: 5 start_period: 60s redis: image: redis:7-alpine container_name: pipeline_redis command: redis-server --appendonly yes --requirepass redis_secure_2024 volumes: - redis_data:/data ports: - "6379:6379" networks: - pipeline_network healthcheck: test: ["CMD", "redis-cli", "--raw", "incr", "ping"] interval: 30s timeout: 10s retries: 5 start_period: 30s mongodb: image: mongo:7 container_name: pipeline_mongodb environment: MONGO_INITDB_ROOT_USERNAME: pipeline_admin MONGO_INITDB_ROOT_PASSWORD: mongo_secure_2024 volumes: - mongodb_data:/data/db ports: - "27017:27017" networks: - pipeline_network rabbitmq: build: context: ./infrastructure/rabbitmq dockerfile: Dockerfile image: automated-dev-pipeline-rabbitmq container_name: pipeline_rabbitmq environment: RABBITMQ_DEFAULT_USER: pipeline_admin RABBITMQ_DEFAULT_PASS: rabbit_secure_2024 volumes: - rabbitmq_data:/var/lib/rabbitmq - rabbitmq_logs:/var/log/rabbitmq ports: - "5673:5672" - "15672:15672" - "15692:15692" networks: - pipeline_network healthcheck: test: ["CMD", "rabbitmq-diagnostics", "ping"] interval: 30s timeout: 10s retries: 5 start_period: 60s # ===================================== # One-shot migrations runner (init job) # ===================================== migrations: image: node:18-alpine container_name: pipeline_migrations working_dir: /app volumes: - ./:/app - migration_state:/tmp # Persistent volume for migration state environment: - POSTGRES_HOST=postgres - POSTGRES_PORT=5432 - POSTGRES_DB=dev_pipeline - POSTGRES_USER=pipeline_admin - POSTGRES_PASSWORD=secure_pipeline_2024 - REDIS_HOST=redis - REDIS_PORT=6379 - REDIS_PASSWORD=redis_secure_2024 - NODE_ENV=development - DATABASE_URL=postgresql://pipeline_admin:secure_pipeline_2024@postgres:5432/dev_pipeline - ALLOW_DESTRUCTIVE_MIGRATIONS=false # Safety flag for destructive operations entrypoint: ["/bin/sh", "-c", "apk add --no-cache postgresql-client python3 py3-pip && chmod +x ./scripts/migrate-all.sh && ./scripts/migrate-all.sh"] depends_on: postgres: condition: service_healthy redis: condition: service_healthy networks: - pipeline_network restart: "no" # ===================================== # Enhanced Infrastructure for Code Generation # ===================================== neo4j: image: neo4j:5.15 container_name: pipeline_neo4j environment: - NEO4J_AUTH=neo4j/password - NEO4J_PLUGINS=["graph-data-science"] - NEO4J_dbms_security_procedures_unrestricted=gds.*,apoc.* ports: - "7474:7474" # Neo4j Browser - "7687:7687" # Bolt protocol volumes: - neo4j_data:/data - neo4j_logs:/logs networks: - pipeline_network healthcheck: test: ["CMD", "cypher-shell", "--username", "neo4j", "--password", "password", "MATCH () RETURN count(*) as count"] interval: 30s timeout: 10s retries: 5 start_period: 60s # chromadb: # image: chromadb/chroma:latest # container_name: pipeline_chromadb # ports: # - "8010:8000" # environment: # - CHROMA_SERVER_HOST=0.0.0.0 # - CHROMA_SERVER_HTTP_PORT=8000 # volumes: # - chromadb_data:/chroma/chroma # networks: # - pipeline_network # healthcheck: # test: ["CMD-SHELL", "curl -f http://localhost:8000/ || exit 1"] # interval: 30s # timeout: 10s # retries: 5 # start_period: 60s # chromadb: # image: chromadb/chroma:latest # container_name: pipeline_chromadb # ports: # - "8010:8000" # Changed port to avoid conflict with API Gateway # environment: # - CHROMA_SERVER_HOST=0.0.0.0 # - CHROMA_SERVER_HTTP_PORT=8000 # volumes: # - chromadb_data:/chroma/chroma # networks: # - pipeline_network # healthcheck: # test: ["CMD", "curl", "-f", "http://localhost:8000/api/v2/heartbeat"] # interval: 30s # timeout: 10s # retries: 5 # chromadb: # image: chromadb/chroma:latest # container_name: pipeline_chromadb # ports: # - "8010:8000" # environment: # - CHROMA_SERVER_HOST=0.0.0.0 # - CHROMA_SERVER_HTTP_PORT=8000 # - IS_PERSISTENT=TRUE # - PERSIST_DIRECTORY=/chroma/chroma # - ANONYMIZED_TELEMETRY=TRUE # volumes: # - chromadb_data:/chroma/chroma # networks: # - pipeline_network # healthcheck: # test: ["CMD", "curl", "-f", "http://localhost:8000/api/v2/heartbeat"] # interval: 30s # timeout: 10s # retries: 5 # start_period: 60s chromadb: image: chromadb/chroma:latest container_name: pipeline_chromadb ports: - "8010:8000" environment: - CHROMA_SERVER_HOST=0.0.0.0 - CHROMA_SERVER_HTTP_PORT=8000 - IS_PERSISTENT=TRUE - PERSIST_DIRECTORY=/chroma/chroma - ANONYMIZED_TELEMETRY=TRUE volumes: - chromadb_data:/chroma/chroma networks: - pipeline_network healthcheck: test: ["CMD-SHELL", "timeout 5 bash -c '