Posit Connect deployment

The Problem

You have a tapyr app, now you want to share it. Your company already has a Posit Connect instance.

How to deploy your tapyr app to Posit Connect?

The Solution

Fortunately, it’s very simple.

Deploy your application to Posit Connect with the rsconnect CLI:

  1. Export your API Key:

    export CONNECT_API_KEY="your_api_key_here"
  2. Configure Posit Connect:

    rsconnect add \
    --api-key $CONNECT_API_KEY \
    --server <MY_CONNECT_URL> \
    --name <SERVER_NAME>
  3. Deploy:

    rsconnect deploy shiny -t "Tapyr App" .

Replace placeholders with your server URL, server name, and API key. Verify the deployment on Posit Connect for successful upload.

Note that you have to configure Posit Connect just once.

Important

Remember to have . in your requirements.txt (it’s on top of the file in the template), so Posit Connect installs your app as a package.