diff --git a/assets/dbip-city-lite-2023-07.mmdb b/assets/dbip-city-lite-2023-07.mmdb new file mode 100644 index 0000000..eca8aa6 Binary files /dev/null and b/assets/dbip-city-lite-2023-07.mmdb differ diff --git a/install.sh b/install.sh index 6ce3fe5..04aa603 100755 --- a/install.sh +++ b/install.sh @@ -3,10 +3,8 @@ set -euo pipefail ## # Source Code - # We store all initial configs in the /srv location cd /srv - # Clone if not yet cloned if [ ! -d .git ]; then git clone https://code.tjo.space/tjo-cloud/ingress.git . @@ -30,7 +28,6 @@ apt update -y apt install -y \ gpg \ git \ - webhook \ nginx \ nginx-extras \ libnginx-mod-http-geoip2 \ @@ -43,13 +40,9 @@ echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stab apt update -y apt install -y alloy -## -# Copy Sysmtemd service/units -#cp -r root/etc/systemd/* / - ## # Ensure services are enabled -systemctl enable --now nginx webhook alloy +systemctl enable --now nginx alloy ## # Configure Alloy @@ -70,10 +63,6 @@ systemctl reload alloy ## # Configure NGINX -#cp -r root/etc/nginx/* /etc/nginx/ +cp assets/dbip-city-lite-2023-07.mmdb /var/geoip.mmdb +cp -r root/etc/nginx/* /etc/nginx/ systemctl reload nginx - -## -# Configure Webhook -#cp -r root/etc/webhook/* /etc/webhook/ -systemctl restart webhook diff --git a/justfile b/justfile index 714d3aa..9e397ea 100644 --- a/justfile +++ b/justfile @@ -66,3 +66,6 @@ provision: cat install.sh | ssh ubuntu@${NODE} 'sudo bash -s' done + +list-servers: + @cd terraform && tofu output -json | jq -r '.nodes.value[]' diff --git a/root/etc/nginx/nginx.conf b/root/etc/nginx/nginx.conf index bfa82d7..7332fd9 100644 --- a/root/etc/nginx/nginx.conf +++ b/root/etc/nginx/nginx.conf @@ -1,15 +1,15 @@ user www-data; worker_processes auto; pid /run/nginx.pid; -error_log /var/log/nginx/error.log; include /etc/nginx/modules-enabled/*.conf; +error_log syslog:server=unix:/dev/log; +access_log syslog:server=unix:/dev/log combined_host; + events { worker_connections 768; } -error_log /dev/stderr error; - stream { # Map of Host -> IP # We will route the traffic to this endpoints.