-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
91 lines (86 loc) · 2.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
91 lines (86 loc) · 2.52 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
# GITHUB_PAT=ghp_xxxxxxx docker compose up --build
# version: '3.8' # [OBSOLETE] Docker Compose v2+ ignores this field; see https://docs.docker.com/compose/compose-file/ for details. Commented out to avoid warning.
services:
elasticsearch:
build:
context: ./src/elasticsearch
container_name: elasticsearch
ports:
- "9200:9200"
volumes:
- data:/usr/share/elasticsearch/data
- logs:/usr/share/elasticsearch/logs
mem_limit: 1g
cpus: 1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health/"]
interval: 30s
timeout: 10s
retries: 5
grafana:
build:
context: ./src/grafana
container_name: grafana
mem_limit: 1g
cpus: 0.5
ports:
- "8080:80"
depends_on:
- elasticsearch
volumes:
- grafana:/var/lib/grafana
- ./grafana-provisioning/dashboards:/var/lib/grafana/dashboards
- ./grafana-provisioning/dashboard.yaml:/etc/grafana/provisioning/dashboards/dashboard.yaml
- ./user_advance_metrics_dashboard.json:/var/lib/grafana/dashboards/user_advance_metrics_dashboard.json
environment:
GF_LOG_LEVEL: debug
GF_SERVER_HTTP_PORT: 80
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: copilot
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/api/health"]
interval: 30s
timeout: 10s
retries: 5
init-grafana:
mem_limit: 0.5g
cpus: 0.25
build:
context: ./src/cpuad-updater/grafana
container_name: init-grafana
depends_on:
- grafana
- elasticsearch
- cpuad-updater
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
GRAFANA_URL: http://grafana:80
GRAFANA_USERNAME: admin
GRAFANA_PASSWORD: copilot
restart: "no"
cpuad-updater:
mem_limit: 0.5g
cpus: 0.25
build:
context: ./src/cpuad-updater
container_name: cpuad-updater
depends_on:
- elasticsearch
environment:
GITHUB_PAT: ${GITHUB_PAT}
ORGANIZATION_SLUGS: ${ORGANIZATION_SLUGS:-standalone:octodemo-copilot-standalone}
ELASTICSEARCH_URL: http://elasticsearch:9200
INDEX_USER_METRICS: copilot_user_metrics
INDEX_USER_ADOPTION: copilot_user_adoption
EXECUTION_INTERVAL_HOURS: ${EXECUTION_INTERVAL_HOURS:-1}
# Add other environment variables as needed
restart: unless-stopped
healthcheck:
test: ["CMD", "pgrep", "-f", "python"]
interval: 5m
timeout: 10s
retries: 3
volumes:
data:
logs:
grafana: