services: redis_cache: image: redis:7-alpine container_name: omniguard_redis command: ["redis-server", "--appendonly", "yes", "--maxmemory", "128mb", "--maxmemory-policy", "allkeys-lru"] ports: - "6379:6379" restart: unless-stopped deploy: resources: limits: memory: 256M healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 data_worker: build: context: . dockerfile: Dockerfile.worker container_name: omniguard_data_worker command: ["python", "-m", "worker.data_worker"] depends_on: redis_cache: condition: service_healthy restart: unless-stopped deploy: resources: limits: memory: 1G environment: OMNIGUARD_REDIS_URL: redis://redis_cache:6379/0 OMNIGUARD_REDIS_STREAM_MAXLEN: "50000" HF_HOME: /tmp/hf-cache env_api: build: context: . dockerfile: Dockerfile container_name: omniguard_env_api depends_on: redis_cache: condition: service_healthy data_worker: condition: service_started restart: unless-stopped deploy: resources: limits: memory: 2G environment: OMNIGUARD_ENV_INSTANCES: "2" OMNIGUARD_USE_TRANSFORMER_EMBEDDER: "0" OMNIGUARD_DISABLE_ORACLE_BOOTSTRAP: "1" OMNIGUARD_ORACLE_CACHE: "2000" OMNIGUARD_QUEUE_SIZE: "128" OMNIGUARD_MAX_LATENCY_STEPS: "12" OMNIGUARD_EPISODE_LENGTH: "8" OMNIGUARD_REDIS_URL: redis://redis_cache:6379/0 HF_HOME: /tmp/hf-cache ports: - "8000:8000"