[英]Deploying a shiny app on Google Cloud App Engine returns an Error
我正在尝试在Google Cloud App Engine灵活环境中部署一个闪亮的应用程序(没有闪亮的服务器)。 所以我将我闪亮的应用程序停靠在我的计算机上。
这是app.yaml:
runtime: custom
env: flex
这是我的docker文件:
# start with the official R project base image
FROM r-base:latest
# copy this github repo into the Docker image and set as the working directory
COPY . /usr/local/src/myscripts
WORKDIR /usr/local/src/myscripts
# Install the C/C++ libraries needed to run the script
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev
# Install the R libraries needed to run the scripts
RUN /usr/bin/R --vanilla -f install_libraries.R
EXPOSE 8080
# Execute the target script
CMD ["Rscript", "run.R"]
这是我的Rcode启动我的闪亮应用程序:run.R
library(shiny)
runApp(port = 8080, host = "0.0.0.0",launch.browser = FALSE)
所有部署进展顺利,但是当我转到我的应用引擎-https://.appspot.com/时 - 我在控制台中出现此错误。 应用程序看起来很灰。
有没有办法将我的闪亮应用程序放在应用程序引擎而不是计算引擎上?
Shiny基于App Engine目前不支持的WebSockets。 但是,它们在Flexible环境中现在支持( 链接 )开箱即用。 这使得Shiny App非常容易在App引擎上进行部署。 从本质上讲,您的代码现在应该正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.