pengbm/rshiny
# create a docker network for rshiny and mysql.
docker network create docker-network
docker pull pengbm/rshiny:v1
# docker pull ccr.ccs.tencentyun.com/bingmp/docker-rshiny:v1 # (China)
docker pull mysql:5.7
docker run --name rshiny -d \
--network docker-network --network-alias rshiny \
-p 3838:3838 -p 8787:8787 \
-e USER=bingm \
-e PASSWORD=yourPassword \
-e ROOT=TRUE \
-e PERUSER=FALSE \
-e TZ=Asia/Shanghai \
pengbm/rshiny:v1
3.1 R shiny tools at path: "~/ShinyApps/" or "/home/bingm/ShinyApps/"
3.2 update code in https://github.com/bingmp/idbview.
3.3 details:
rstudio-server: ip:8787; user: bingm; password: yourPassword
your can remove "assets/" folder and "index.html" file in ~/ShinyApps/
shiny-server: ip:3838; (or https://db.chcmu.com.cn)
docker run -d --name mysql \
--network docker-network --network-alias mysql \
-p 3306:3306 \
-e TZ=Asia/Shanghai \
-e MYSQL_ROOT_PASSWORD=yourPassword \
mysql:5.7
4.1 create acccount "idbview" in mysql;
4.2 create database "idbview" in mysql;
4.3 upload data to mysql.
idbview.sql file at: https://db.chcmu.com.cn/idbview.sql
4.4 The password of account "idbview" in mysql should be the same as the password for the connection in rshiny
# rshiny connection file path: "~/ShinyApps/global/server/conMysql.R"
library('RMySQL')
mysql_con <- paste0("dbConnect(MySQL(),",
"user='idbview',",
"port=3306,",
"password='yourPassword',",
"dbname='idbview',",
"host = 'mysql')")
docker pull pengbm/rshiny