-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.override.yaml
86 lines (80 loc) · 2.26 KB
/
docker-compose.override.yaml
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
---
# Override file for testing prometheus ingest
version: "3.8"
volumes:
prometheus_config:
prometheus_data:
rendered_hosts:
grafana_data:
services:
ecs-service-discovery: # uses local credentials to perform API calls
image: public.ecr.aws/compose-x/ecs-service-discovery
volumes:
- rendered_hosts:/rendered_hosts
- ~/.aws:/root/.aws
environment:
AWS_PROFILE: ${AWS_PROFILE:-default}
command:
- -d
- /rendered_hosts
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- prometheus_config:/prom_config/
- prometheus_data:/prometheus
- rendered_hosts:/rendered_hosts/
command:
- '--config.file=/prom_config/prometheus.yaml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- "9090:9090/tcp"
depends_on:
- prometheus-config
grafana:
image: grafana/grafana
container_name: grafana
volumes:
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
ports:
- "3000:3000/tcp"
links:
- prometheus:prometheus
prometheus-config:
image: public.ecr.aws/compose-x/ecs-files-composer
restart: "on-failure"
deploy:
restart_policy:
condition: none
volumes:
- prometheus_config:/prom_config/
command:
- -e
- ECS_CONFIG_CONTENT
environment:
ECS_CONFIG_CONTENT: |
files:
/prom_config/prometheus.yaml:
content: |
global:
scrape_interval: 1m
scrape_configs:
- job_name: "prometheus"
scrape_interval: 1m
static_configs:
- targets: ["localhost:9090"]
- job_name: "ecs_sd"
scrape_interval: 1m
file_sd_configs:
- files:
- /rendered_hosts/*.json
refresh_interval: 1m