From: Clifton Palmer Date: Wed, 1 Nov 2023 08:54:54 +0000 (-0500) Subject: Added go conf X-Git-Url: http://git.purplebirdman.com/proxy.git/commitdiff_plain/ec42b2a34bf18e8ae49d724eebe880ac7a41cf5e?hp=5369a58058aabcf3ea37f28cd0fe8c0cad81dbc4 Added 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"; + } +}