In the documentation of ShinyProxy, there are instructions on how to dockerize ShinyProxy. There are also instructions on how to use nginx as a reverse proxy.
However, it would be great if nginx could be dockerized as well.
Based on the following link, I created a nginx config file, but it just launches ShinyProxy, and not the apps containers.
worker_processes 1;
events { worker_connections 1024; }
http {
sendfile on;
upstream shinyProxy {
server shinyproxy:8080;
}
server {
listen 80;
location / {
proxy_pass http://shinyProxy;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 600s;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Protocol $scheme;
}
}
}
and my docker-compose file
version: "3"
services:
reverseproxy:
build:
context: .
dockerfile: reverse.Dockerfile
ports:
- 80:80
restart: always
shinyproxy:
build:
context: .
dockerfile: shinyProxy.Dockerfile
networks:
default:
external:
name: sp-example-net
ShinyProxy.Dockerfile is this the same as the openanalytics/shinyproxy-config-examples repository
reverse.Dockerfile is just the nginx container with the config file.
Do you have any idea of what is wrong with that config?
Best!