]> Untitled Git - proxy.git/commitdiff
Added go conf
authorClifton Palmer <clifton.james.palmer@protonmail.com>
Wed, 1 Nov 2023 08:54:54 +0000 (03:54 -0500)
committerClifton Palmer <clifton.james.palmer@protonmail.com>
Wed, 1 Nov 2023 08:57:57 +0000 (03:57 -0500)
README.md
conf.d/go.conf [new file with mode: 0644]

index 333ab12e5e4bb3a0f5e15dbf48ac543e737e1ee8..12e943f6fa887e1312e850ac5ac49f2d205cffd6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,2 +1,5 @@
 # docker-swarm-routing
 Routing nginx service for docker swarm
+
+# notes when adding to conf.d
+After adding a new .conf file, replicas must be scaled to 0 then to 1 for change to take effect
diff --git a/conf.d/go.conf b/conf.d/go.conf
new file mode 100644 (file)
index 0000000..e98e49f
--- /dev/null
@@ -0,0 +1,19 @@
+server {
+    listen               443 ssl;
+    server_name          go.purplebirdman.com;
+    ssl_certificate      /etc/ssl/certs/cert.pem;
+    ssl_certificate_key  /etc/ssl/certs/key.pem;
+    location / {
+        proxy_pass http://go_web;
+        proxy_set_header Host $host;
+    }
+    location /ws {
+        proxy_pass http://go_web;
+        proxy_set_header Host $host;
+
+        # websocket magic
+        proxy_http_version 1.1;
+        proxy_set_header Upgrade $http_upgrade;
+        proxy_set_header Connection "Upgrade";
+    }
+}