Skip to content

Latest commit

 

History

History

r-shinylive

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

R Shinylive

Create R Shinylive version following https://github.com/posit-dev/r-shinylive/:

# Export static files
R -q -e "shinylive::export('r-shiny/app', 'r-shinylive/app')"

# Serve contents, visit http://localhost:8080
R -q -e "httpuv::runStaticServer('r-shinylive/app', port=8080)"

Containerized version using locally rendered artifacts:

  • served with httpuv (:httpuv)
  • served with Nginx (:nginx)
  • served with Apache (:httpd)
  • served with OpenFaaS Watchdog (:of)
# Change directory
cd r-shinylive

# If on MacOS X, set this
export DOCKER_DEFAULT_PLATFORM=linux/amd64

# Specify tag
export NAME=faithful/r-shinylive

# Build image
docker build -t ${NAME}:of -f Dockerfile .

# Run image, visit http://localhost:8080
docker run --rm -p 8080:8080 ${NAME}:of

Containerized version using multi-stage build to render in Docker:

# Stay in the root directory for wider build context
# cd ..

# If on MacOS X, set this
export DOCKER_DEFAULT_PLATFORM=linux/amd64

# Specify tag
export NAME=faithful/r-shinylive

# Build image
docker build -t ${NAME}:multi -f r-shinylive/Dockerfile.multi .

# Run image, visit http://localhost:8080
docker run --rm -p 8080:8080 ${NAME}:multi