From 77e5064e0f97f4e3ea51381f676952f98889ea9d Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 3 Dec 2024 16:14:30 -0800 Subject: [PATCH 1/2] improved "what is defang" page --- docs/intro/what-is-defang.mdx | 31 ++++++++++++++++++++----- docs/tutorials/deploy-to-playground.mdx | 2 +- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/docs/intro/what-is-defang.mdx b/docs/intro/what-is-defang.mdx index 3228c100f..316700ce8 100644 --- a/docs/intro/what-is-defang.mdx +++ b/docs/intro/what-is-defang.mdx @@ -8,10 +8,29 @@ description: What is Defang? -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. diff --git a/docs/tutorials/deploy-to-playground.mdx b/docs/tutorials/deploy-to-playground.mdx index e2dc5fd31..ebcbcc38a 100644 --- a/docs/tutorials/deploy-to-playground.mdx +++ b/docs/tutorials/deploy-to-playground.mdx @@ -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/) From 1c85f2a5df8f59ffd1c65da7bcc05f5aa27711b2 Mon Sep 17 00:00:00 2001 From: commit111 Date: Tue, 3 Dec 2024 17:04:47 -0800 Subject: [PATCH 2/2] improve "deploy existing containers" page --- .../deploy-container-using-the-cli.mdx | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/docs/tutorials/deploy-container-using-the-cli.mdx b/docs/tutorials/deploy-container-using-the-cli.mdx index a2d2584cb..9b3de625e 100644 --- a/docs/tutorials/deploy-container-using-the-cli.mdx +++ b/docs/tutorials/deploy-container-using-the-cli.mdx @@ -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 ```