TelethonKids / deploy_shiny_app

Template to deploy Shiny Apps via Docker and ShinyProxy
37 stars 13 forks source link

WebSocket error hosting on EC2 production server #2

Closed pgstevenson closed 5 years ago

pgstevenson commented 5 years ago

To be done at the same time as #1 .

Test to make sure this works on development (works in production), update nginx.conf to:

worker_processes 1;
events { worker_connections 1024; }

http {

  upstream shinyproxy {
     server shinyproxy:8080;
  }

  map $http_upgrade $connection_upgrade {
      default upgrade;
      ''      close;
    }

  server {
    listen 80;

    location / {
      proxy_pass http://shinyproxy;
      proxy_redirect / $scheme://$http_host/;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;
      proxy_read_timeout 20d;
      proxy_buffering off;
    }
  }
}