From d5c83e93ae769eb1dbe4038f558149e86b47147e Mon Sep 17 00:00:00 2001
From: DerGrumpf
Date: Mon, 25 Nov 2024 23:16:41 +0100
Subject: [PATCH] Added Nginx
---
deployment/garde-studios.de.compose.yml | 2 +-
proxy/nginx/compose.yml | 10 ++++++++++
proxy/nginx/data/nginx/map.garde-studios.de | 13 +++++++++++++
proxy/nginx/data/nginx/monitoring.garde-studios.de | 13 +++++++++++++
proxy/{ => velocity}/compose.yml | 0
proxy/{ => velocity}/forwarding.secret | 0
proxy/{ => velocity}/server-icon.png | Bin
proxy/{ => velocity}/unifiedmetrics/config.yml | 0
.../unifiedmetrics/driver/prometheus.yml | 0
proxy/{ => velocity}/velocity.toml | 0
10 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 proxy/nginx/compose.yml
create mode 100644 proxy/nginx/data/nginx/map.garde-studios.de
create mode 100644 proxy/nginx/data/nginx/monitoring.garde-studios.de
rename proxy/{ => velocity}/compose.yml (100%)
rename proxy/{ => velocity}/forwarding.secret (100%)
rename proxy/{ => velocity}/server-icon.png (100%)
rename proxy/{ => velocity}/unifiedmetrics/config.yml (100%)
rename proxy/{ => velocity}/unifiedmetrics/driver/prometheus.yml (100%)
rename proxy/{ => velocity}/velocity.toml (100%)
diff --git a/deployment/garde-studios.de.compose.yml b/deployment/garde-studios.de.compose.yml
index 401ccac..8a4b86a 100644
--- a/deployment/garde-studios.de.compose.yml
+++ b/deployment/garde-studios.de.compose.yml
@@ -1,4 +1,4 @@
include:
- - ../proxy/compose.yml
+ - ../proxy/velocity/compose.yml
- ../fallback/compose.yml
- ../monitoring/compose.yml
diff --git a/proxy/nginx/compose.yml b/proxy/nginx/compose.yml
new file mode 100644
index 0000000..3cce308
--- /dev/null
+++ b/proxy/nginx/compose.yml
@@ -0,0 +1,10 @@
+services:
+ nginx:
+ image: nginx:1.15-alpine
+ ports:
+ - "80:80"
+ - "443:443"
+ volumes:
+ - ./data/nginx:/etc/nginx/conf.d
+ certbot:
+ image: certbot/certbot
diff --git a/proxy/nginx/data/nginx/map.garde-studios.de b/proxy/nginx/data/nginx/map.garde-studios.de
new file mode 100644
index 0000000..5d7921a
--- /dev/null
+++ b/proxy/nginx/data/nginx/map.garde-studios.de
@@ -0,0 +1,13 @@
+server {
+ listen 80;
+ server_name example.org; location / {
+ return 301 https://$host$request_uri;
+ }
+}server {
+ listen 443 ssl;
+ server_name example.org;
+
+ location / {
+ proxy_pass http://example.org; #for demo purposes
+ }
+}
diff --git a/proxy/nginx/data/nginx/monitoring.garde-studios.de b/proxy/nginx/data/nginx/monitoring.garde-studios.de
new file mode 100644
index 0000000..5d7921a
--- /dev/null
+++ b/proxy/nginx/data/nginx/monitoring.garde-studios.de
@@ -0,0 +1,13 @@
+server {
+ listen 80;
+ server_name example.org; location / {
+ return 301 https://$host$request_uri;
+ }
+}server {
+ listen 443 ssl;
+ server_name example.org;
+
+ location / {
+ proxy_pass http://example.org; #for demo purposes
+ }
+}
diff --git a/proxy/compose.yml b/proxy/velocity/compose.yml
similarity index 100%
rename from proxy/compose.yml
rename to proxy/velocity/compose.yml
diff --git a/proxy/forwarding.secret b/proxy/velocity/forwarding.secret
similarity index 100%
rename from proxy/forwarding.secret
rename to proxy/velocity/forwarding.secret
diff --git a/proxy/server-icon.png b/proxy/velocity/server-icon.png
similarity index 100%
rename from proxy/server-icon.png
rename to proxy/velocity/server-icon.png
diff --git a/proxy/unifiedmetrics/config.yml b/proxy/velocity/unifiedmetrics/config.yml
similarity index 100%
rename from proxy/unifiedmetrics/config.yml
rename to proxy/velocity/unifiedmetrics/config.yml
diff --git a/proxy/unifiedmetrics/driver/prometheus.yml b/proxy/velocity/unifiedmetrics/driver/prometheus.yml
similarity index 100%
rename from proxy/unifiedmetrics/driver/prometheus.yml
rename to proxy/velocity/unifiedmetrics/driver/prometheus.yml
diff --git a/proxy/velocity.toml b/proxy/velocity/velocity.toml
similarity index 100%
rename from proxy/velocity.toml
rename to proxy/velocity/velocity.toml