Skip to content

Commit

Permalink
Update Community Cloud docs (#1149)
Browse files Browse the repository at this point in the history
* Update workspaces and deployment

* GitHub update limitation

* Forking apps

* Update account creation

* Update Community Cloud quickstart

* Update Manage your app pages

* Move & update Streamlit upgrade KB article

* Update account management

* Move renaming instructions and consequences out of KB

* Update account management

* Review ...community-cloud/get-started

* Review ...community-cloud/deploy-your-app

* Review ...community-cloud/manage-your-app

* Review ...community-cloud/manage-your-account

* Update get-started/installation quickstart for Community Cloud

* Check for links to deploy section

* Update ...community-cloud/get-started category page

* Remove unused Community Cloud images

* Fix unversioned pages

* Update hibernation schedule

* Apply suggestions from editorial review, part 1

Co-authored-by: Melinda Faulkner <[email protected]>

* Apply suggestions from editorial review, part 2

* Apply suggestions from editorial review, part 3

---------

Co-authored-by: Melinda Faulkner <[email protected]>
  • Loading branch information
sfc-gh-dmatthews and sfc-gh-mfaulkner authored Sep 21, 2024
1 parent 7f0bf3c commit 2d8e407
Show file tree
Hide file tree
Showing 226 changed files with 987 additions and 1,043 deletions.
8 changes: 4 additions & 4 deletions content/deploy/community-cloud/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ slug: /deploy/streamlit-community-cloud

# Welcome to Streamlit Community Cloud

Deploy, manage, and share your Streamlit apps with the world in minutes &mdash; all for free. Your Streamlit Community Cloud account connects directly to your GitHub repository (public or private). Most apps will launch in only a few minutes. Streamlit Community Cloud handles all of the containerization so all you need to worry about is creating the app. Rapidly prototype, explore, and update apps by simply changing your code in GitHub. Most changes appear immediately!
With Streamlit Community Cloud, you can create, deploy, and manage your Streamlit apps &mdash; all for free. Share your apps with the world and build a customized profile page to display your work. Your Community Cloud account connects directly to your GitHub repositories (public or private). Most apps will launch in only a few minutes. Community Cloud handles all of the containerization, so deploying is easy. Bring your own code, or start from one of our popular templates. Rapidly prototype, explore, and update apps by simply changing your code in GitHub. Most changes appear immediately!

Want to avoid the work of setting up a local development environment? Community Cloud can help you quickly configure a codespace to develop in the cloud. Whether it's your own deployed app or an app deployed from a public repository, it only takes a few clicks to start coding or editing a Streamlit app. See [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app).
Want to avoid the work of setting up a local development environment? Community Cloud can help you quickly configure a codespace to develop in the cloud. Start coding or editing a Streamlit app with just a few clicks. See [Edit your app](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app).

If you haven't built your first Streamlit app yet, you can check out [Get started](/get-started) in our Streamlit library documentation or [Fork and edit a public app](/deploy/streamlit-community-cloud/get-started/fork-and-edit-a-public-app) from our <a href="https://streamlit.io/gallery" target="_blank">App gallery</a>. Check out [Community Cloud quickstart](/deploy/streamlit-community-cloud/get-started) to speed-run you through creating your account, deploying an example app, and editing it using GitHub Codespaces.
Go to our [Community Cloud quickstart](/deploy/streamlit-community-cloud/get-started/quickstart) to speed-run through creating your account, deploying an example app, and editing it using GitHub Codespaces. If you haven't built your first Streamlit app yet, see [Get started with Streamlit](/get-started).

<InlineCalloutContainer>
<InlineCallout
Expand All @@ -29,7 +29,7 @@ If you haven't built your first Streamlit app yet, you can check out [Get starte
icon="settings"
bold="Manage your app."
href="/deploy/streamlit-community-cloud/manage-your-app"
>Access logs, reboot apps, set favorites, and more. Jump into a GitHub Codespace to edit your app in the cloud.</InlineCallout>
>Access logs, reboot apps, set favorites, and more. Jump into a GitHub codespace to edit your app in the cloud.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="share"
Expand Down
171 changes: 40 additions & 131 deletions content/deploy/community-cloud/deploy-your-app/_index.md
Original file line number Diff line number Diff line change
@@ -1,142 +1,51 @@
---
title: Deploy your app
title: Prep and deploy your app on Community Cloud
slug: /deploy/streamlit-community-cloud/deploy-your-app
---

# Deploy your app
# Prep and deploy your app on Community Cloud

Streamlit Community Cloud lets you deploy your apps in just one click, and most apps will deploy in only a few minutes. If you don't have an app ready to deploy, fork or clone one from our <a href="https://streamlit.io/gallery" target="_blank">App gallery</a>you can find apps for machine learning, data visualization, data exploration, A/B testing and more. You can also fork and deploy samples straight from the [New app button](/deploy/streamlit-community-cloud/get-started/explore-your-workspace#new-app-button). Once you've deployed your app, check out how you can [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces).
Streamlit Community Cloud lets you deploy your apps in just one click, and most apps will be deployed in only a few minutes. If you don't have an app ready to deploy, you can fork or clone one from our <a href="https://streamlit.io/gallery" target="_blank">App gallery</a>&mdash;you can find apps for machine learning, data visualization, data exploration, A/B testing, and more. You can also [Deploy an app from a template](/deploy/streamlit-community-cloud/get-started/deploy-from-a-template). After you've deployed your app, check out how you can [Edit your app with GitHub Codespaces](/deploy/streamlit-community-cloud/manage-your-app/edit-your-app#edit-your-app-with-github-codespaces).

<Note>

If you want to deploy your app on a different cloud service, check out the [Deploy Streamlit apps](/deploy/tutorials) article in our Knowledge Base.
If you want to deploy your app on a different cloud service, see our [Deployment tutorials](/deploy/tutorials).

</Note>

## Add your app to GitHub

Streamlit Community Cloud launches apps directly from your GitHub repo, so your app code and dependencies need to be on GitHub before you try to deploy your app. For more information on how to specify dependencies, see [App dependencies](/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies).

Your directory structure should look similar to this:

```
your-repository/
├── your_app.py
└── requirements.txt
```

If you are including any custom [Configuration](/develop/concepts/configuration) or [Theming](/develop/concepts/configuration/theming), make sure your config file is saved relative to the root of your repo. Within your repo, your config file should be named `.streamlit/config.toml`.

```
your-repository/
├── .streamlit/
│ └── config.toml
├── your_app.py
└── requirements.txt
```

Additionally, any files that need to be locally available to your app should be included in your repo.

<Tip>

If you have really big or binary data that you change frequently, and git is feeling slow, you might want to check out [Git Large File Store (LFS)](https://git-lfs.github.com/) as a better way to store large files in GitHub. You don't need to make any changes to your app to start using it. If your GitHub repo uses LFS, it will _just work_ with Streamlit Community Cloud.

</Tip>

<Important>

Although you can deploy multiple apps from the same repository, there can be only one configuration file. This configuration file must be in a `.streamlit` directory in the root of your repository.

</Important>

## Deploy your app

1. From your workspace at <a href="https://share.streamlit.io" target="_blank">share.streamlit.io</a>, click "**New app**" from the upper-right corner of your workspace.

![Deploy a new app from your workspace](/images/streamlit-community-cloud/deploy-empty-new-app.png)

2. Fill in your repo, branch, and file path. As a shortcut, you can also click "**Paste GitHub URL**" to paste a link directly to `your_app.py` on GitHub.

An app URL with a random hash is prefilled but you can change this to a custom subdomain instead. In the example below, the app would be deployed to `https://red-balloon.streamlit.app/`. You can always change your subdomain later. See more about [Custom subdomains](#custom-subdomains) at the end of this page.

![Fill in your app's information to deploy your app](/images/streamlit-community-cloud/deploy-an-app.png)

While Community Cloud attempts to suggest available repos and files, these suggestions are not always complete. If you do not see the desired information populating a drop-down list in each field, type it in manually.

## Advanced settings for deployment

<Note>

Streamlit Community Cloud supports all released [versions of Python that are still receiving security updates](https://devguide.python.org/versions/). Streamlit Community Cloud defaults to version 3.9. You can select a version of your choice from the "Python version" dropdown in the "Advanced settings" modal. If an app is running a version of Python that becomes unsupported, it will be forcibly upgraded to the oldest, supported version of Python and may break.

</Note>

3. (Optional) If you are connecting to a data source or want to specify the Python version for your app, you can do that by clicking "**Advanced settings**" before you deploy the app. Learn more about [Secrets management](/deploy/streamlit-community-cloud/deploy-your-app/secrets-management).

![Advanced settings for deploying your app](/images/streamlit-community-cloud/deploy-an-app-advanced.png)

## Watch your app launch

Your app is now deploying and you can watch while it launches. Most apps take only a couple of minutes to deploy, but if your app has a lot of dependencies it may take longer to deploy the first time. After the initial deployment, any change that does not touch your dependencies should show up immediately.

![Watch your app launch](/images/streamlit-community-cloud/deploy-an-app-provisioning.png)

<Note>

The Streamlit Community Cloud logs on the right hand side of your app are only viewable to users with developer access to your repository. These logs help you debug any issues with the app. Learn more about [Streamlit Community Cloud logs](/deploy/streamlit-community-cloud/manage-your-app#streamlit-community-cloud-logs).

</Note>

## Your app URL

That's it — you're done! Your app now has a unique subdomain URL that you can share with others. Read more about how to [Share your app](/deploy/streamlit-community-cloud/share-your-app) with viewers.

### Unique subdomains

If the "**Custom subdomain (optional)**" field is blank when you deploy your app, a URL is assigned following a structure based on your GitHub repo. The URL begins with your GitHub username or organization owning your repo, followed by your repo name, app path, and a short hash. If you deploy from a branch other than `main` or `master`, the URL also includes the branch name.

```bash
https://[GitHub username or organization]-[repo name]-[app path]-[branch name]-[short hash].streamlit.app
```

For example, this is an app deployed from the `streamlit` organization. The repo is `demo-self-driving` and the app name is `streamlit_app.py` in the root directory. The branch name is `master` and therefore not included.

```bash
https://streamlit-demo-self-driving-streamlit-app-8jya0g.streamlit.app
```

### Custom subdomains

Setting a custom subdomain makes it much easier to share your app since you can choose something memorable. Whether you set a custom subdomain during deployment or later, your app's URL will appear as:

```bash
https://<your-custom-subdomain>.streamlit.app
```

To view or customize your app subdomain from the dashboard:

1. Click the overflow icon (<i style={{ verticalAlign: "-.25em" }} className={{ class: "material-icons-sharp" }}>more_vert</i>) to the app's right and select "**Settings**".

<div style={{ maxWidth: '90%', margin: '0 2em 0 2em' }}>
<Image src="/images/streamlit-community-cloud/workspace-app-settings.png" alt="Streamlit Community Cloud app settings" />
</div>

2. View the "**General**" tab in the App settings modal. Your app's unique subdomain will appear here.

<div style={{ maxWidth: '90%', margin: '0 2em 0 2em' }}>
<Image src="/images/streamlit-community-cloud/workspace-app-settings-general.png" alt="Streamlit Community Cloud general app settings" />
</div>

3. Pick a custom subdomain between 6 and 63 characters in length for your app's URL and hit "**Save**".

<div style={{ maxWidth: '90%', margin: '0 2em 0 2em' }}>
<Image src="/images/streamlit-community-cloud/workspace-app-settings-general-valid-domain.png" alt="New custom subdomain for your app" />
</div>

It's that simple! You can then access your app by visiting your customized URL 🎉.

If a custom subdomain is not available (e.g. because it's already taken), you'll see an error message like this:

<div style={{ maxWidth: '90%', margin: '0 2em 0 2em' }}>
<Image src="/images/streamlit-community-cloud/workspace-app-settings-general-invalid-domain.png" alt="Invalid custom subdomain for your app" />
</div>
## Summary

The pages that follow explain how to organize your app and provide complete information for Community Cloud to run it correctly.

When your app has everything it needs, deploying is easy. Just go to your workspace and click "**Create app**" in the upper-right corner. Follow the prompts to fill in your app's information, and then click "**Deploy**."

![Deploy a new app from your workspace](/images/streamlit-community-cloud/deploy-empty-new-app.png)

## Ready, set, go!

<InlineCalloutContainer>
<InlineCallout
color="lightBlue-70"
icon="description"
bold="File organization."
href="/deploy/streamlit-community-cloud/deploy-your-app/file-organization"
>Learn how Community Cloud initializes your app and interprets paths. Learn where to put your configuration files.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="build_circle"
bold="App dependencies."
href="/deploy/streamlit-community-cloud/deploy-your-app/app-dependencies"
>Learn how to install dependencies and other Python libraries into your deployment environment.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="password"
bold="Secrets management."
href="/deploy/streamlit-community-cloud/deploy-your-app/secrets-management"
>Learn about the interface Community Cloud provides to securely upload your <code>secrets.toml</code> data.</InlineCallout>
<InlineCallout
color="lightBlue-70"
icon="flight_takeoff"
bold="Deploy your app"
href="/deploy/streamlit-community-cloud/deploy-your-app/deploy"
>Put it all together to deploy your app for the whole world to see.</InlineCallout>
</InlineCalloutContainer>
Loading

0 comments on commit 2d8e407

Please sign in to comment.