Skip to content

analythium/fly-shiny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Deploy Shiny Apps to Fly.io

This repository is an appendix to Fly related posts on the Hosting Data Apps website:

What is Fly

Deploy App Servers Close to Your Users

Run your full stack apps (and databases!) all over the world. No ops required.

Setup

Following the Fly.io intro: https://fly.io/docs/hands-on/start/

Step 1. Install flyctl https://fly.io/docs/hands-on/installing/

Step 2. Sign up or sign in https://fly.io/docs/hands-on/sign-up/

flyctl auth login

Step 3. Create an app

We will use the Docker image from the https://gitlab.com/analythium/shinyproxy-hello project:

export DOCKER_IMAGE="analythium/shinyproxy-demo:latest"
docker pull $DOCKER_IMAGE

Now create the app and follow instructions (you'll need credit card info too):

flyctl launch --image $DOCKER_IMAGE

Now open the newly created fly.toml and edit (see https://fly.io/docs/reference/configuration/ for detailed config options):

...
[[services]]
...
  internal_port = 3838
...

Step 4. Deploy the app

flyctl deploy

Now the image gets pushed into the Fly registry. Once the release is healthy, you have a shiny app.

Step 5. Check the app status. The output will give the Hostname (app.fly.dev where app is the app name from the TOML file)

flyctl status

Step 6. Visit the app

Copy the Hostname and paste in the browser tab, or use flyctl open.

CICD and GitHub Actions

See the .github/workflows/main.yml file for an example.

Resources

About

Deploy Shiny Apps to Fly.io

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published