From ec42b2a34bf18e8ae49d724eebe880ac7a41cf5e Mon Sep 17 00:00:00 2001 From: Clifton Palmer Date: Wed, 1 Nov 2023 03:54:54 -0500 Subject: [PATCH 1/1] Added go conf --- README.md | 3 +++ conf.d/go.conf | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 conf.d/go.conf diff --git a/README.md b/README.md index 333ab12..12e943f 100644 --- 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 index 0000000..e98e49f --- /dev/null +++ b/conf.d/go.conf @@ -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"; + } +} -- 2.47.2