Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 1-Click Deploy tutorial #160

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/concepts/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Use the `defang config` command of the Defang CLI to manage the values.
You can find a sample of how to set sensitive config values [here](https://github.com/DefangLabs/samples/tree/main/samples/nodejs-openai).
:::

:::info
Note that if you are using the [1-Click Deploy](/docs/tutorials/using-one-click-deploy) option, you can set sensitive config values as secrets in your GitHub repository and the action will automatically deploy them for you.
:::

## Interpolation

Environment variables are set within the `environment` section of a service in a `compose.yaml` file. Any variables declared here will become available within the service container.
Expand Down
2 changes: 1 addition & 1 deletion docs/providers/playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: The Defang Playground is a free tier that allows you to experiment
sidebar_position: 0000
---

The Defang Playground is a free tier that allows you to experiment with Defang. The Playground is a shared environment that should not be used to run production workloads. The Playground is a great way to get started with Defang using "1-click deploy" or to experiment with the Defang CLI.
The Defang Playground is a free tier that allows you to experiment with Defang. The Playground is a shared environment that should not be used to run production workloads. The Playground is a great way to get started with Defang using [1-Click Deploy](/docs/tutorials/using-one-click-deploy) or to experiment with the [Defang CLI](/docs/getting-started).
commit111 marked this conversation as resolved.
Show resolved Hide resolved

This page highlights architectural considerations when deploying to the Playground and any differences you might encounter when deploying to the Playground versus deploying to your own cloud account.

Expand Down
42 changes: 42 additions & 0 deletions docs/tutorials/using-one-click-deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Using 1-Click Deploy
sidebar_position: 800
description: Use 1-Click Deploy to easily deploy a sample to the Defang Playground.
---

# Using 1-Click Deploy

This tutorial will show you how to use Defang 1-Click Deploy to deploy a sample.

The 1-Click Deploy button is intended to be a quickstart way for new users to deploy to the [Defang Playground](/docs/concepts/defang-playground) with no prior installation needed.
commit111 marked this conversation as resolved.
Show resolved Hide resolved

:::info
If this is not your first time, we recommend using the [Defang CLI](/docs/getting-started) to get a full experience of deploying with Defang.
commit111 marked this conversation as resolved.
Show resolved Hide resolved
:::

## Step 1 - Choose a Sample
Head to our [list of samples](https://defang.io/#samples) and click a sample you want to deploy. Then, click on the button that says "1-Click Deploy".

Alterntively, you can find the "1-Click Deploy" button located in the `README.md` file of each sample's repository.

## Step 2 - Allow Permissions

After you've clicked, you will be prompted to use GitHub to log in. Once you see a "Create a Repository" page appear, allow the sample repository to get cloned into your GitHub account.

## Step 3 - Wait for Deployment to Complete

A Github action workflow will automatically start running to install Defang and deploy the sample to the Defang Playground. If you wish to, you can see this by going into the "Actions" tab in your GitHub repository.

You can view the status of your deployment in the [Defang Portal](https://portal.defang.dev/), or by downloading the [Defang CLI](/docs/getting-started).

:::tip
Defang has a tutorial on how you can [monitor your services](/docs/tutorials/monitoring-your-services).
:::

:::info
If you decide to make a commit later to a repository created from 1-Click Deploy, then the project will automatically get deployed again to Defang Playground.
:::

### Configuration in 1-Click Deploy

If the sample you chose requires setting configuration, such as API keys, you can set sensitive config values as secrets in your GitHub repository and the action will automatically deploy them for you.
commit111 marked this conversation as resolved.
Show resolved Hide resolved
Loading