Find file History
Type Name Latest commit message Commit time
Failed to load latest commit information.

Example: containerized ShinyProxy with a docker swarm

In this example, ShinyProxy will run inside a Kubernetes cluster. Shiny containers will also be spawned in the same cluster. To make the application accessible outside the cluster, a NodePort service is created.

How to run

  1. Download the Dockerfile from the folder where this README is located.
  2. Download the application.yml configuration file from the folder where this README is located.
  3. Place the files in the same directory, e.g. /home/user/sp
  4. Open a terminal, go to the directory /home/user/sp, and run the following command to build the ShinyProxy image:

sudo docker build . -t shinyproxy-example

  1. Create a docker network that ShinyProxy will use to communicate with the Shiny containers.

sudo docker network create -d overlay sp-example-net

  1. Run the following command to launch the ShinyProxy container:

sudo docker service create --name sp-test-service --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock --publish 8080:8080 --network sp-example-net shinyproxy-example

Notes on the configuration

  • ShinyProxy will listen for HTTP traffic on port 8080 of each swarm node.

  • The overlay network sp-example-net is needed to allow the containers to access each other using the container ID as hostname.