version: '3.8' services: postgres: image: timescale/timescaledb:latest-pg16 container_name: foxhunt-postgres environment: POSTGRES_DB: foxhunt POSTGRES_USER: foxhunt POSTGRES_PASSWORD: foxhunt_dev_password ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U foxhunt"] interval: 10s timeout: 5s retries: 5 networks: - foxhunt-network redis: image: redis:7-alpine container_name: foxhunt-redis ports: - "6379:6379" volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 networks: - foxhunt-network vault: image: hashicorp/vault:1.15 container_name: foxhunt-vault environment: VAULT_ADDR: http://0.0.0.0:8200 VAULT_DEV_ROOT_TOKEN_ID: foxhunt-dev-root ports: - "8200:8200" volumes: - vault_data:/vault/data cap_add: - IPC_LOCK command: vault server -dev -dev-listen-address=0.0.0.0:8200 healthcheck: test: ["CMD", "vault", "status"] interval: 30s timeout: 10s retries: 5 networks: - foxhunt-network api_gateway: image: foxhunt_api_gateway:latest container_name: foxhunt-api-gateway ports: - "50051:50050" - "9091:9091" environment: - GATEWAY_BIND_ADDR=0.0.0.0:50050 - DATABASE_URL=postgresql://foxhunt:foxhunt_dev_password@postgres:5432/foxhunt - REDIS_URL=redis://redis:6379 - VAULT_ADDR=http://vault:8200 - VAULT_TOKEN=foxhunt-dev-root - TRADING_SERVICE_URL=http://trading_service:50051 - BACKTESTING_SERVICE_URL=http://backtesting_service:50052 - JWT_SECRET=YZg5/mpqzH0NehGJXiR1yUgUg74HqdOUj/q9tnVSX+gqZvuzHKI1n0NhL4yP8CkUx7WyrVs3X86OSSxIUA6sxQ== - JWT_ISSUER=foxhunt-api-gateway - JWT_AUDIENCE=foxhunt-services - RATE_LIMIT_RPS=100 - ENABLE_AUDIT_LOGGING=true - RUST_LOG=info - RUST_BACKTRACE=1 depends_on: postgres: condition: service_healthy redis: condition: service_healthy vault: condition: service_healthy trading_service: condition: service_healthy backtesting_service: condition: service_healthy healthcheck: test: ["CMD", "/usr/local/bin/grpc_health_probe", "-addr=localhost:50050"] interval: 10s timeout: 5s start_period: 30s retries: 3 networks: - foxhunt-network restart: unless-stopped trading_service: image: foxhunt_trading_service:latest container_name: foxhunt-trading-service ports: - "50052:50051" - "9092:9092" environment: - DATABASE_URL=postgresql://foxhunt:foxhunt_dev_password@postgres:5432/foxhunt - REDIS_URL=redis://redis:6379 - VAULT_ADDR=http://vault:8200 - VAULT_TOKEN=foxhunt-dev-root - JWT_SECRET=YZg5/mpqzH0NehGJXiR1yUgUg74HqdOUj/q9tnVSX+gqZvuzHKI1n0NhL4yP8CkUx7WyrVs3X86OSSxIUA6sxQ== - RUST_LOG=info - RUST_BACKTRACE=1 depends_on: postgres: condition: service_healthy redis: condition: service_healthy vault: condition: service_healthy healthcheck: test: ["CMD", "/usr/local/bin/grpc_health_probe", "-addr=localhost:50051"] interval: 10s timeout: 5s start_period: 30s retries: 3 networks: - foxhunt-network restart: unless-stopped backtesting_service: image: foxhunt_backtesting_service:latest container_name: foxhunt-backtesting-service ports: - "50053:50052" - "9093:9093" environment: - DATABASE_URL=postgresql://foxhunt:foxhunt_dev_password@postgres:5432/foxhunt - REDIS_URL=redis://redis:6379 - VAULT_ADDR=http://vault:8200 - VAULT_TOKEN=foxhunt-dev-root - JWT_SECRET=YZg5/mpqzH0NehGJXiR1yUgUg74HqdOUj/q9tnVSX+gqZvuzHKI1n0NhL4yP8CkUx7WyrVs3X86OSSxIUA6sxQ== - BENZINGA_API_KEY=demo_key_please_replace - RUST_LOG=info - RUST_BACKTRACE=1 depends_on: postgres: condition: service_healthy redis: condition: service_healthy vault: condition: service_healthy healthcheck: test: ["CMD", "/usr/local/bin/grpc_health_probe", "-addr=localhost:50052"] interval: 10s timeout: 5s start_period: 30s retries: 3 networks: - foxhunt-network restart: unless-stopped volumes: postgres_data: redis_data: vault_data: networks: foxhunt-network: driver: bridge