Welcome
License
Foreword
Preface
Motivation
Who Is This Book For?
What Will You Learn?
What Will You Not Learn?
Conventions
About the Authors
Acknowledgements
I Getting Started
1
Background
1.1
Data-intensive Apps
1.2
Enter Shiny
1.3
Application Development
1.4
Application Hosting
1.5
The DevOps Cycle
1.6
The Hosting Cycle
1.7
Summary
2
Hosting Concepts
2.1
Domains and Networking
2.2
Website Technologies
2.3
Servers
2.4
Hosting Environments
2.5
Summary
3
Local Setup
3.1
Installing Your Developer Tools
3.1.1
R
3.1.2
Python
3.1.3
Web Browser
3.1.4
Quarto
3.1.5
Docker Desktop
3.2
The Command Line
3.2.1
Navigation
3.2.2
Editing Files
3.2.3
File and Directory Operations
3.2.4
Super User Access
3.3
Source Code Management with Git
3.3.1
Git Services
3.3.2
Git Commands
3.3.3
.gitignore
3.3.4
Branching
3.4
Working with Servers
3.4.1
Secure Shell (SSH)
3.5
Readability on the Command Line
3.6
Other Useful Tools
3.7
Summary
4
Examples
4.1
Old Faithful
4.2
Bananas
4.2.1
The Bananas Data Set
4.2.2
Model Training
4.2.3
The Shiny App
4.3
Load Balancing Test
4.4
Summary
II Shiny Apps
5
Developing Shiny Apps
5.1
Creating a Shiny App
5.1.1
The User Interface
5.1.2
The Server Function
5.1.3
Shiny Express
5.2
Organizing Shiny Apps
5.2.1
Single file
5.2.2
Multiple Files
5.2.3
Shiny App with Nested File Structure
5.2.4
Programmatic Cases
5.2.5
Shiny App as an R Package
5.2.6
Dynamic Documents
5.2.7
Shinylive
5.3
Running Shiny Apps Locally
5.3.1
R
5.3.2
Python
5.3.3
The Shiny App Lifecycle
5.4
Sharing the Shiny App Code
5.5
Summary
6
Containerizing Shiny Apps
6.1
Docker Concepts
6.1.1
Docker Engine
6.1.2
Container Registries
6.1.3
Images
6.1.4
The Dockerfile
6.1.5
Containers
6.1.6
The Docker Command Line
6.2
Working with Existing Images
6.2.1
Image Names and Tags
6.2.2
Pulling an Image
6.2.3
Docker Login
6.2.4
Running a Container
6.3
Building a New Image
6.3.1
R for Shiny
6.3.2
Buildx and BuildKit
6.3.3
Inspecting the Image
6.3.4
Python for Shiny
6.4
Managing Images
6.5
Sharing Images
6.5.1
Pushing Images
6.5.2
Docker Registries
6.5.3
Log In to a Registry
6.5.4
Local Registry
6.6
The Dockerfile
6.6.1
The Parent Image
6.6.2
Metadata
6.6.3
Dependencies
6.6.4
Directories and Files
6.6.5
Switching User
6.6.6
Expose a Port
6.6.7
Variables
6.6.8
Executable and Command
6.7
Parent Images
6.7.1
Popular Parent Images for R
6.7.2
Popular Parent Images for Python
6.8
Installing System Libraries
6.8.1
Manually Installation
6.8.2
Automated Dependency Resolution with r2u
6.8.3
Dependencies on Alpine Linux
6.9
Installing R Packages
6.9.1
Explicitly Stating Dependencies
6.9.2
Using the DESCRIPTION File
6.9.3
Using renv
6.9.4
Using deps
6.10
Python Requirements
6.11
Dynamic Shiny Apps
6.11.1
R
6.11.2
Python
6.11.3
R Markdown
6.11.4
Quarto with R
6.11.5
Quarto with Python
6.11.6
Shiny Server
6.12
Static Shiny Apps
6.12.1
Multi-stage Builds
6.13
Image Analysis
6.13.1
Attestations
6.13.2
Vulnerability Scanning
6.14
Containers
6.14.1
Docker Run
6.14.2
Health Check
6.14.3
Container Life Cycle
6.14.4
Managing Containers
6.14.5
Docker Compose
6.14.6
The Compose File
6.14.7
Compose Command Line
6.14.8
Container Orchestration
6.15
Best Practices
6.15.1
Parent Images
6.15.2
Minimize Dependencies
6.15.3
Cache and Order Layers
6.15.4
Switch to Non-root User
6.15.5
No Secrets
6.15.6
Shell vs. Exec Syntax
6.15.7
Log to STDOUT and STDERR
6.15.8
Include HEALTHCHECK
6.15.9
Version Your Images
6.15.10
Readability
6.15.11
More Tips
6.16
Summary
References
Hosting Shiny Applications for R and Python
Foreword
This is an awesome book! I can recommend it.
John Doe, Affiliation