This vignette documents a initial approach to set up a shiny-based server to make SOUNDBoard reports available to users. It is derived from download on installation and configuration provided by RStudio.

Installation

Create a system-level R installation

Configuration

Create and configure the soundboard user

Create a new user

sudo adduser soundboard

Run R as soundboard, installing shiny and rmarkdown

$ sudo su - soundboard
soundboard$ R
> source("https://bioconductor.org/biocLite.R")
> biocLite(c("shiny", "rmarkdown"))

(Workaround?) Make sure that R knows to use cairo for plotting. Do this by adding a file ~soundboard/.Rprofile

local({
    options(
        bitmapType = "cairo"
    )
})

Create directories for applications and logs, and populate with default (testing) applications

soundboard$ mkdir ~/srv/apps
soundboard$ mkdir -p ~/var/log
soundboard$ cp -a /srv/shiny-server/* ~/srv

Configure shiny-server

From an account with sudo access, edit the configuration file

~$ sudo vi /etc/shiny-server/shiny-server.conf

Create a location entry, e.g., augmenting the default configuration

run_as shiny;

server {
  listen 3838;

  # Define a location at the base URL
  location / {
    site_dir /srv/shiny-server;
    log_dir /var/log/shiny-server;
    directory_index on;
  }

  location /SOUNDBoard {
    run_as soundboard;
    site_dir /home/soundboard/srv;
    log_dir /home/soundboard/var/log/shiny-server;
    directory_index on;
  }
}

Run

Start / stop / restart

sudo systemctl start shiny-server
sudo systemctl stop shiny-server
sudo systemctl restart shiny-server

Test

Visit http://localhost:3838/SOUNDBoard

Debug

Server log

/var/log/shiny-server.log

User application logs

/var/log/shiny-server/
~soundboard/var/log/shiny-server


Bioconductor/SOUNDBoard documentation built on May 6, 2019, 7:52 a.m.