services: ollama-node: image: ollama/ollama:latest container_name: docker-llama ports: - "127.0.0.1:11434:11434" volumes: - ollamaState:/root/.ollama - ./models:/models networks: - backendIsolated - frontendAccess environment: - OLLAMA_HOST=0.0.0.0:11434 - OLLAMA_MODELS=/models - OLLAMA_KEEP_ALIVE=30m - OLLAMA_NUM_PARALLEL=1 - OLLAMA_API_KEY=hermit-secure-key-123 # Change this for proper API Key restart: unless-stopped healthcheck: test: ["CMD", "ollama", "ps"] interval: 20s timeout: 10s retries: 6 start_period: 20s security_opt: - no-new-privileges:true read_only: false hermes-agent: build: context: ./hermes-agent dockerfile: Dockerfile container_name: docker-hermes restart: unless-stopped tty: true stdin_open: true # Prevents premature container exit so you can execute scripts interactively command: ["tail", "-f", "/dev/null"] depends_on: ollama-node: condition: service_healthy environment: - OPENAI_API_BASE=http://ollama-node:11434/v1 - OPENAI_API_KEY=hermit-secure-key-123 - HERMES_API_KEY=hermit-secure-key-123 volumes: - hermesStorage:/root/.hermes networks: - backendIsolated - frontendAccess security_opt: - no-new-privileges:true networks: backendIsolated: internal: true frontendAccess: driver: bridge volumes: ollamaState: name: ollamaState hermesStorage: name: hermesStorage