Update HTTPS configuration (#333)
[discourse_docker.git] / templates / web.socketed.template.yml
index ca3b29c0490c88c1c6781a2cc6546a7f9ee13d20..2addf49973f4714948c48ade08f2c1d6651c337d 100644 (file)
@@ -1,13 +1,25 @@
-
 run:
-  - exec: rm -f /shared/nginx.http*.sock;
+  - file:
+     path: /etc/runit/1.d/remove-old-socket
+     chmod: "+x"
+     contents: |
+        #!/bin/bash
+        rm -f /shared/nginx.http*.sock
+  - file:
+     path: /etc/runit/3.d/remove-old-socket
+     chmod: "+x"
+     contents: |
+        #!/bin/bash
+        rm -f /shared/nginx.http*.sock
   - replace:
      filename: "/etc/nginx/conf.d/discourse.conf"
      from: /listen 80;/
      to: |
        listen unix:/shared/nginx.http.sock;
+       set_real_ip_from unix:;
   - replace:
      filename: "/etc/nginx/conf.d/discourse.conf"
-     from: /listen 443 ssl spdy;/
+     from: /listen 443 ssl http2;/
      to: |
-       listen unix:/shared/nginx.https.sock ssl spdy;
+       listen unix:/shared/nginx.https.sock ssl http2;
+       set_real_ip_from unix:;