我们让 golem 软件包自动为我们创建一个Dockerfile,并可以运行Docker映像并在根目录http://localhost:3838/?...
但是我们希望该应用程序出现在http://localhost:3838/myApp/v1/?...
这样的子目录中,以便我们可以为Apache设置必要的代理,并使该应用程序和其他应用程序都可以在单个服务器上使用。
我们可以手动编辑Dockerfile以复制包含以下信息的Shiny-server.conf文件:
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location /myApp/v1/ {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
}
}
上述解决方案感觉很像黑客,我们希望 golem 内有功能,这些功能将使我们能够设置应用程序出现的子目录。