Fix minor typo errors | Change Nginx for Caddy | Consolidate templates in this repo

This commit is contained in:
2025-01-24 02:57:53 -03:00
parent 21515daef1
commit ddf0301463
15 changed files with 254 additions and 35 deletions

View File

@@ -0,0 +1,17 @@
#!/bin/bash
function install_prometheus() {
REPO_URL="https://raw.githubusercontent.com/elAgala/server-initializer/master"
TEMPLATE_PATH="/templates/monitoring"
username="$1"
monitoring_dir="/home/$username/monitoring"
echo "[ MONITOR ]: Starting Prometheus setup"
mkdir -p "$monitoring_dir"
wget "$REPO_URL/$TEMPLATE_PATH/docker-compose.yml" -O "$monitoring_dir/docker-compose.yml"
wget "$REPO_URL/$TEMPLATE_PATH/prometheus.yml" -O "$monitoring_dir/prometheus.yml"
cd "$monitoring_dir"
echo "[ MONITOR ]: Prometheus Installed. Starting on docker container"
sudo docker compose up -d
echo "[ MONITOR ]: Prometheus up & running on port 9090"
}