【发布时间】:2020-12-15 19:01:34
【问题描述】:
我们让golem包自动为我们创建一个Dockerfile,可以运行docker镜像,在根目录下可以看到app: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;
}
}
上面的解决方案感觉像是一个 hack,我们希望 golem 内部有功能可以让我们设置应用程序出现的子目录。
【问题讨论】:
标签: golem