-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·36 lines (28 loc) · 976 Bytes
/
Copy pathsetup.sh
File metadata and controls
executable file
·36 lines (28 loc) · 976 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
GRN="\033[0;32m"; RED="\033[0;31m"; YEL="\033[1;33m"; NC="\033[0m"
require() {
command -v "$1" >/dev/null 2>&1 || { echo -e "${RED}$1 not found. Aborting.${NC}"; exit 1; }
}
require docker
require envsubst
docker compose version >/dev/null 2>&1 || { echo -e "${RED}docker compose plugin not found.${NC}"; exit 1; }
cd "$(dirname "$0")/infra-monitor"
if [ ! -f .env ]; then
cp .env.example .env
echo -e "${YEL}.env created from .env.example — edit it and re-run.${NC}"
exit 0
fi
set -a; . ./.env; set +a
envsubst < config/alertmanager.yml.tmpl > config/alertmanager.yml
echo -e "${YEL}Starting stack…${NC}"
docker compose up -d
cat <<EOF
${GRN}Infra Monitor is live${NC}
Grafana: http://localhost:3000 (admin/admin)
Prometheus: http://localhost:9090
Alertmanager: http://localhost:9093
Jaeger: http://localhost:16686
Loki: http://localhost:3100
cAdvisor: http://localhost:8080
EOF