Files
glpi-ai-agent/docker-compose.yml
jbergner f21da92dc6
All checks were successful
release-tag / release-image (push) Successful in 1m29s
Bugfix
2026-07-27 19:18:36 +02:00

61 lines
1.5 KiB
YAML

services:
agent-data-init:
build:
context: .
target: data-init
restart: "no"
user: "0:0"
volumes:
- agent-data:/app/data
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- CHOWN
- FOWNER
agent:
build: .
restart: unless-stopped
env_file: .env
environment:
# Container-specific paths/hostnames override the native-friendly .env defaults.
DATA_DIR: /app/data
KNOWLEDGE_DIR: /app/knowledge
OLLAMA_URL: http://ollama:11434
# Local CPU inference can take several minutes on the first request.
OLLAMA_TIMEOUT: ${OLLAMA_TIMEOUT:-10m}
OLLAMA_NUM_PREDICT: ${OLLAMA_NUM_PREDICT:-256}
OLLAMA_KEEP_ALIVE: ${OLLAMA_KEEP_ALIVE:-10m}
OLLAMA_THINK: ${OLLAMA_THINK:-false}
OLLAMA_MAX_CONCURRENT: ${OLLAMA_MAX_CONCURRENT:-1}
ports:
- "127.0.0.1:8080:8080"
volumes:
- agent-data:/app/data
- ./knowledge:/app/knowledge:ro
depends_on:
agent-data-init:
condition: service_completed_successfully
ollama:
condition: service_started
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
tmpfs:
- /tmp:size=64m,mode=1777
ollama:
image: ollama/ollama:latest
restart: unless-stopped
volumes:
- ollama-data:/root/.ollama
# GPU users can add the appropriate device/runtime stanza for their platform.
volumes:
agent-data:
ollama-data: