-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (77 loc) · 2.36 KB
/
docker-compose.yml
File metadata and controls
81 lines (77 loc) · 2.36 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
services:
timescaledb:
image: timescale/timescaledb:2.17.2-pg16
container_name: agentmonitor-timescaledb
environment:
POSTGRES_USER: agentmonitor
POSTGRES_PASSWORD: agentmonitor
POSTGRES_DB: agentmonitor
ports:
- "5432:5432"
volumes:
- timescale_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U agentmonitor -d agentmonitor"]
interval: 5s
timeout: 5s
retries: 20
redis:
image: redis:7.4.2
container_name: agentmonitor-redis
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
fastapi:
image: python:3.11-slim
container_name: agentmonitor-fastapi
working_dir: /app
volumes:
- ./:/app
environment:
AGENTMONITOR_TIMESCALE_DSN: postgresql://agentmonitor:agentmonitor@timescaledb:5432/agentmonitor
AGENTMONITOR_POSTGRES_DSN: postgresql://agentmonitor:agentmonitor@timescaledb:5432/agentmonitor
AGENTMONITOR_RETENTION_DAYS: "90"
AGENTMONITOR_ALERT_INTERVAL_SECONDS: "30"
AGENTMONITOR_API_KEY: local-dev-key
AGENTMONITOR_SLACK_WEBHOOK_URL: ""
AGENTMONITOR_EMAIL_SMTP_HOST: localhost
AGENTMONITOR_EMAIL_SMTP_PORT: "1025"
AGENTMONITOR_EMAIL_FROM: alerts@agentmonitor.local
AGENTMONITOR_EMAIL_TO: oncall@agentmonitor.local
AGENTMONITOR_PAGERDUTY_ROUTING_KEY: ""
AGENTMONITOR_ANTHROPIC_API_KEY: ""
REDIS_URL: redis://redis:6379/0
command: >-
sh -c "pip install --no-cache-dir -r requirements.txt &&
pip install --no-cache-dir -e ./sdk &&
uvicorn server.api.main:app --host 0.0.0.0 --port 8000"
ports:
- "8000:8000"
depends_on:
timescaledb:
condition: service_healthy
redis:
condition: service_healthy
grafana:
image: grafana/grafana:11.4.0
container_name: agentmonitor-grafana
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
GF_USERS_ALLOW_SIGN_UP: "false"
ports:
- "3000:3000"
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
- grafana_data:/var/lib/grafana
depends_on:
timescaledb:
condition: service_healthy
volumes:
timescale_data:
grafana_data: