-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (74 loc) · 1.92 KB
/
docker-compose.yml
File metadata and controls
85 lines (74 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: '3.8'
services:
harmony-agent:
build:
context: .
dockerfile: Dockerfile
image: harmony-safe-agent:latest
container_name: harmony-agent
# Environment variables
environment:
- JAVA_OPTS=-Xmx2g -Xms512m
- HARMONY_CONFIG_DIR=/app/config
- HARMONY_WORKSPACE_DIR=/app/workspace
- HARMONY_REPORTS_DIR=/app/reports
- HARMONY_CACHE_DIR=/app/cache
# AI API Keys (set these in .env file)
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- CLAUDE_API_KEY=${CLAUDE_API_KEY:-}
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY:-}
# Volumes for persistent data
volumes:
# Mount source code to analyze
- ./workspace:/app/workspace:ro
# Mount reports output
- ./reports:/app/reports
# Mount cache for performance
- ./cache:/app/cache
# Mount config for customization
- ./config:/app/config
# Mount user settings
- harmony-user-data:/home/harmony/.harmony-agent
# Interactive mode
stdin_open: true
tty: true
# Network configuration
ports:
- "8080:8080" # For future web interface
# Resource limits
deploy:
resources:
limits:
memory: 3G
cpus: '2.0'
reservations:
memory: 1G
cpus: '0.5'
# Restart policy
restart: unless-stopped
# Health check
healthcheck:
test: ["CMD", "java", "-jar", "harmony-agent.jar", "config", "get", "ai.provider"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: Redis for caching (future enhancement)
redis:
image: redis:7-alpine
container_name: harmony-redis
volumes:
- redis-data:/data
ports:
- "6379:6379"
restart: unless-stopped
profiles:
- cache
volumes:
harmony-user-data:
driver: local
redis-data:
driver: local
networks:
default:
name: harmony-network