Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
31 changes: 25 additions & 6 deletions docs/intro/what-is-defang.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,29 @@ description: What is Defang?

<iframe width="560" height="315" src="https://www.youtube.com/embed/afglsBYieuc?si=iKgUX4ejz7AixxqQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen style={{marginBottom: "2rem"}}></iframe>

Defang is a radically simpler way for developers to develop, deploy, and debug their cloud applications. Defang enables you to easily author cloud application in any language, build and deploy to the cloud with a single command, and iterate quickly with AI-assisted tooling.
## A Tool to Develop, Debug, Deploy

- The [Defang CLI](/docs/getting-started#install-the-defang-cli.md) includes an AI-driven agent that translates natural language prompts to an outline for your project that you can then refine.
- Defang can automatically build and deploy your project with a single command.
- If you’re new to Defang, you can try deploying to the [Defang Playground](/docs/concepts/defang-playground.md), a hosted environment to learn to use Defang with non-production workloads.
- Once you’re ready, you can [deploy](/docs/concepts/deployments.md) it to your own cloud account - we call this [Defang BYOC](/docs/concepts/defang-byoc.md). Defang takes care of all the heavy lifting such as configuring networking, security, [observability](/docs/concepts/observability.md) and all the other details that usually slow down the average cloud developer.
- You can also use Defang to easily [publish updates](/docs/concepts/deployments.md#deploying-updates) to your deployed application with zero downtime.
Defang is a radically simpler way for developers to develop, deploy, and debug their cloud applications. Defang enables you to easily author cloud applications in any language, build and deploy to the cloud with a single command, and iterate quickly with AI-assisted tooling.

### Develop

The [Defang CLI (command line interface)](/docs/getting-started#install-the-defang-cli.md) includes an AI-driven agent that translates natural language prompts to [generate an outline](/docs/tutorials/generate-new-code-using-ai) for your project that you can then refine.

### Deploy

Defang can automatically build and deploy your project with a single command.

- If you’re new to Defang, you can try deploying to [Defang Playground](/docs/concepts/defang-playground.md), a hosted environment to learn to use Defang with non-production workloads.
- Once you’re ready, you can [deploy](/docs/tutorials/deploy-to-your-cloud) a project to your own cloud account - we call this [Defang BYOC (Bring-your-Own-Cloud)](/docs/concepts/defang-byoc.md). We offer support for the following cloud providers:
* [Amazon Web Services (AWS)](/docs/tutorials/deploy-to-aws)
* [DigitalOcean](/docs/tutorials/deploy-to-digitalocean)
* [Google Cloud Platform (GCP)](/docs/tutorials/deploy-to-gcp)
- To support stateful workloads, we've got managed storage options such as [Managed Postgres](/docs/concepts/managed-storage/managed-postgres) and [Managed Redis](/docs/concepts/managed-storage/managed-redis).
- If you want, you can also [bring your own domain name](docs/tutorials/use-your-own-domain-name) for your deployment.

Defang takes care of all the heavy lifting such as configuring networking, security, [observability](/docs/concepts/observability.md) and all the other details that usually slow down the average cloud developer.
It also allows you to easily [publish updates](/docs/concepts/deployments.md#deploying-updates) to your deployed application with zero downtime.

### Debug

Once you've deployed, you can use our AI agent to help [debug](/docs/concepts/debug) your cloud applications, using your service logs and project files to help you identify and resolve issues.
37 changes: 31 additions & 6 deletions docs/tutorials/deploy-container-using-the-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,48 @@ sidebar_position: 200

# Deploy Existing Containers

This example is useful if you already have a Docker container built manually or through a CI/CD system and have that the resulting image is available in a public or private repository accessible by Defang.
This tutorial will show you how to deploy an existing container/multi-container application.

This example is rather useful if you already have a Docker container built manually, or through a CI/CD system where the resulting image is available in a public or private repository accessible by Defang.
But it is not required in order to follow along to this tutorial.

# Step 1 - Make a Docker Compose file
:::tip
If you are unfamiliar with Docker Compose files, check out the [Compose](/docs/concepts/compose) page.
:::
Create a `compose.yaml` file to define the [service(s)](/docs/concepts/services) in your application.

If you already have a Docker Compose file to define your service(s), you can use it directly and skip this step.

# Step 1 - Docker Compose
If you already have a Docker Compose file for your service(s) you can use it directly. Else you can create one like this:

```yaml
version: '3.9'
services:
service1:
# This is just an example, replace with the image you want
image: "docker.io/nginx:latest"
web:
image: nginx:latest
ports:
- mode: ingress
target: 3000
app:
build:
context: .
dockerfile: Dockerfile
ports:
- mode: ingress
target: 4000
redis:
image: redis:6.2
restart: unless-stopped
ports:
- mode: host
target: 6379
```

The example above shows a multi-container application with 3 services, `web`, `app`, `redis`.
If you wanted to deploy only one container, say `app`, then the example would remain the same, except without the `web` and `redis` services.

# Step 2 - Deploy
Run the following command in the [Defang CLI]((/docs/getting-started#install-the-defang-cli.md)).
```text
defang compose up
```
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/deploy-to-playground.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 15

# Deploy to Playground

This tutorial will show you how to deploy your project to the free Defang Playground.
This tutorial will show you how to deploy your project to the free [Defang Playground](/docs/concepts/defang-playground).

## Pre-requisites
* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/)
Expand Down
Loading