首页 > 解决方案 > 如何最好地设置我的 Shiny Server 的开发部署?

问题描述

我的 Shinyconfig文件设置如下:

# 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;
  }
}

这将我的生产应用程序托管shiny-server在基本 URL 的目录中,这是我想要的行为。我怎么还能托管存储在的 Shiny 应用程序的开发shiny-server/dev版本baseurl.com/dev

如果我尝试以下操作,我会在以下位置获得“未找到”网页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;
    
  }
}

标签: rshinyshiny-server

解决方案


推荐阅读