civisanalytics/civis-services-shiny.
a. If your code is at a directory in your repo (rather than directly at the root level of your repo), specify the directory path that points to where the app code is located.
For the Docker image, the name is civisanalytics/civis-services-shiny,
and the tag is one of those listed on DockerHub.
Note that the specific Docker image name and tag you've chosen determines which R version your app is going to run on.
For more information on deploying Shiny Apps in Civis Platform, please see Helpful Tips for Shiny App Deployments.
As applications grow in size, a modular structure improves maintainability.
While very short applications may fit nicely in a single app.R, it is
recommended to use a seperate server.R and ui.R for larger projects.
For large projects, it is also recommended to keep the code in server.R
and ui.R simple by writing functions and modules in seperate R files
which are sourced at the top of the server.R and ui.R files.
Basic
Top Level │ README.md │ Dockerfile │ app.R │ global.R
Advanced / Customized
Top Level │ README.md │ server.R │ ui.R │ global.R | install.R │ DESCRIPTION │ <extra_scripts>.R │ <modules>.R └─── www │ <custom_javascript>.js │ <custom_css>.css │ <custom_img>.gif File names inside <> will change from project to project
README.md
app.R
server.R and ui.R.server.R and ui.R are present.server.R
ui.R
global.R
ui.R and server.R. If only
server needs to look at the state, prefer isolating code in server.R.install.R file.DESCRIPTION
<extra_scripts>.R
server.R outside the main server function.
That is, code that is run when the application is launched and is
accessible to all server sessions.server.R should be the single server function
with a call to source("extra_scripts.R", local=TRUE) at the top
of the file.<modules>.R
ui.R and server.R.<modules>.R is sourced from global.R with
source("modules.R") so the modules can be used in both ui.R
and server.R.www
Either build the Docker image locally
bashdocker build -t civis-services-shiny .
or download the image from DockerHub
bashdocker pull civisanalytics/civis-services-shiny:latest
The latest tag (Docker's default if you don't specify a tag)
will give you the most recently built version of the civis-services-shiny
image. You can replace the tag latest with a version number such as 1.0
to retrieve a reproducible environment.
If you would like to test the image locally follow the steps below:
Build your image locally:
docker build -t civis-services-shiny:test .
Run the container:
docker run --rm -p 3838:3838 -e APP_DIR=/app -e CIVIS_API_KEY civis-services-shiny:test
This mounts the app folder in the Docker container under /app, where the entrypoint expects to find it.
You will need to modify the run command if your application is at a different path.
It also makes the CIVIS_API_KEY environment variable accessible to the container, for initializing the Civis API client.
However, this variable does not need to be defined in order for the app to run.
Visit [***] to access your app.
a. This is the default URL. The Shiny application logs should also tell you where the app is being served at.
b. The app should also be available at the ip of your docker host with port 3838: <docker-host-ip>:3838.
For example, when using Docker for Mac <docker-host-ip> was 127.0.0.1, so the app was available at [***].
See CONTRIBUTING for information about contributing to this project.
If you make any changes, be sure to build a container to verify that it successfully completes:
bashdocker build -t civis-services-shiny:test .
and describe any changes in the change log.
This repo has autobuild enabled. Any PR that is merged to master will be built as the latest tag on Docker Hub.
Once you are ready to create a new version, go to the "releases" tab of the repository and click "Draft a new release". Github will prompt you to create a new tag, release title, and release description. The tag should use semantic versioning in the form "vX.X.X"; "major.minor.micro".
The title of the release should be the same as the tag. Include a change log in the release description.
Once the release is tagged, DockerHub will automatically build three identical containers, with labels "major", "major.minor", and "major.minor.micro".
This repo has branch builds enabled. Branches will be built with the tag dev-<branch name> on Docker Hub.
BSD-3
See LICENSE.md for details.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务