Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (105 loc) · 2.89 KB
/
Copy pathdocker-compose.yml
File metadata and controls
115 lines (105 loc) · 2.89 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# RLM Server Docker Compose Configuration
#
# This file provides different deployment scenarios for the RLM server:
# - Development: Local development with volume mounts
# - Production: Production-ready configuration with health checks
# - Multi-backend: Example with multiple LLM providers
version: '3.8'
services:
# Main RLM server service
rlm-server:
build: .
container_name: rlm-server
ports:
- "8080:8080"
environment:
# Server configuration
- RLM_SERVER_HOST=0.0.0.0
- RLM_SERVER_PORT=8080
# LLM provider configuration (OpenAI)
- RLM_LLM_PROVIDER=openai
- RLM_LLM_MODEL=gpt-4
- RLM_LLM_API_KEY=${OPENAI_API_KEY:-}
# Processing configuration
- RLM_MAX_CONTEXT_SIZE=10000000
- RLM_MAX_RECURSIVE_DEPTH=10
- RLM_MAX_ITERATIONS=50
# Logging
- RLM_LOG_LEVEL=info
- RLM_LOG_FORMAT=json
volumes:
# Mount logs directory for persistence
- ./logs:/app/logs
# Optional: Mount custom config
- ./config.yaml:/app/config.yaml:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
networks:
- rlm-network
# Optional: Redis for caching (if needed in future)
redis:
image: redis:7-alpine
container_name: rlm-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
networks:
- rlm-network
profiles:
- with-cache
# Optional: Prometheus for metrics collection
prometheus:
image: prom/prometheus:latest
container_name: rlm-prometheus
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
networks:
- rlm-network
profiles:
- monitoring
# Optional: Grafana for metrics visualization
grafana:
image: grafana/grafana:latest
container_name: rlm-grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin123}
volumes:
- grafana-data:/var/lib/grafana
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards:ro
- ./monitoring/grafana/datasources:/etc/grafana/provisioning/datasources:ro
networks:
- rlm-network
profiles:
- monitoring
depends_on:
- prometheus
networks:
rlm-network:
driver: bridge
volumes:
redis-data:
prometheus-data:
grafana-data: