How to best set up a development deployment of my Shiny Server?

Viewed 27

I have my Shiny config file set up as such:

# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;

# Define a server that listens on port 3838
server {
  listen 3838;

  # Define a location at the base URL 
  location / {

    # Host the directory of Shiny Apps stored in this directory
     app_dir /srv/shiny-server/prod;

    # Log all Shiny output to files in this directory
     log_dir /var/log/shiny-server;
  }
}

This hosts my production application in the shiny-server directory at the base URL, which is my desired behavior. How could I also host a development version of my Shiny application stored in shiny-server/dev at baseurl.com/dev?

If I try the following, I get a "Not Found" webpage at baseurl.com/dev

# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;

# Define a server that listens on port 3838
server {
  listen 3838;

  # Define a location at the base URL 
  location / {

    # Host the directory of Shiny Apps stored in this directory
     app_dir /srv/shiny-server/prod;

    # Log all Shiny output to files in this directory
     log_dir /var/log/shiny-server;
     
  }
  
  location /dev {
  
    # Host the directory of Shiny Apps stored in this directory
    app_dir /srv/shiny-server/dev;
    
    # Log all Shiny output to files in this directory
    log_dir /var/log/shiny-server;
    
  }
}
0 Answers
Related