From 407d84d6ce0b5f8e71648edb18ddc610cd12cfc4 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 29 Nov 2024 10:08:58 -0800 Subject: [PATCH 01/10] avoid homepage wall-of-text --- docs/intro.md | 34 -------------- docs/intro/_category_.json | 5 +++ docs/intro/features.mdx | 22 +++++++++ docs/intro/intro.mdx | 19 ++++++++ docs/{use-cases => intro}/use-cases.md | 14 +++--- docs/intro/what-is-defang.mdx | 17 +++++++ docs/tutorials/deploy-to-playground.mdx | 59 +++++++++++++++++++++++++ docs/tutorials/deploy-to-your-cloud.mdx | 2 +- package-lock.json | 1 + package.json | 1 + src/components/IntroGrid.tsx | 37 ++++++++++++++++ 11 files changed, 169 insertions(+), 42 deletions(-) delete mode 100644 docs/intro.md create mode 100644 docs/intro/_category_.json create mode 100644 docs/intro/features.mdx create mode 100644 docs/intro/intro.mdx rename docs/{use-cases => intro}/use-cases.md (92%) create mode 100644 docs/intro/what-is-defang.mdx create mode 100644 docs/tutorials/deploy-to-playground.mdx create mode 100644 src/components/IntroGrid.tsx diff --git a/docs/intro.md b/docs/intro.md deleted file mode 100644 index 911128c8e..000000000 --- a/docs/intro.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -sidebar_position: 100 -title: Overview -description: Overview of Defang, a radically simpler way to develop, deploy, and debug production-ready cloud apps. ---- - - - -### 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. - -- The [Defang CLI](./getting-started/installing.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](./concepts/defang-playground.md), a hosted environment to learn to use Defang with non-production workloads. - - Once you’re ready, you can [deploy](./concepts/deployments.md) it to your own cloud account - we call this [Defang BYOC](./concepts/defang-byoc.md). Defang takes care of all the heavy lifting such as configuring networking, security, [observability](./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](./concepts/deployments.md#deploying-updates) to your deployed application with zero downtime. - -### Features - -Defang provides a streamlined experience to develop, deploy, observe, and update your cloud applications. Defang includes the following features: - -- Support for [various types of applications](./use-cases/use-cases.md): Web services and APIs, mobile app backends, ML services, hosting LLMs, etc. -- Support for your programming [language of choice](./samples.md): Node.js, Python, Golang, or anything else you can package in a Dockerfile. -- Built-in AI agent to go [from natural language prompt to an outline project](./concepts/generate.md) -- Built-in AI agent to help you [debug your cloud applications](./concepts/debug.md) -- Automated [Dockerfile builds](./concepts/deployments.md) -- Support for [pre-built Docker containers](./tutorials/deploy-container-using-the-cli.mdx), from public or private image registries -- Ability to express your project configuration using a [Docker Compose YAML](./concepts/compose.md) file -- Ability to manage [encrypted configuration values](./concepts/configuration.md) -- Pre-configured environments with built-in [security](./concepts/security.md), [networking](./concepts/networking.mdx), and [observability](./concepts/observability.md) -- [One-command deployments](./getting-started/installing.md) -- Support for [GPUs](./concepts/resources.md) -- Support for Infra-as-Code via the [Defang Pulumi provider](./concepts/pulumi.md) diff --git a/docs/intro/_category_.json b/docs/intro/_category_.json new file mode 100644 index 000000000..ba93f2c79 --- /dev/null +++ b/docs/intro/_category_.json @@ -0,0 +1,5 @@ +{ + "label": "Overview", + "position": 1, + "collapsible": true +} diff --git a/docs/intro/features.mdx b/docs/intro/features.mdx new file mode 100644 index 000000000..ffb36cfc8 --- /dev/null +++ b/docs/intro/features.mdx @@ -0,0 +1,22 @@ +--- +sidebar_position: 200 +title: Features +description: Defang Features +--- + +# Defang Features + +Defang provides a streamlined experience to develop, deploy, observe, and update your cloud applications. Defang includes the following features: + +- Support for [various types of applications](/docs/use-cases): Web services and APIs, mobile app backends, ML services, hosting LLMs, etc. +- Support for your programming [language of choice](/docs/samples): Node.js, Python, Golang, or anything else you can package in a Dockerfile. +- Built-in AI agent to go [from natural language prompt to an outline project](/docs/concepts/generate.md) +- Built-in AI agent to help you [debug your cloud applications](/docs/concepts/debug.md) +- Automated [Dockerfile builds](/docs/concepts/deployments.md) +- Support for [pre-built Docker containers](/docs/tutorials/deploy-container-using-the-cli.mdx), from public or private image registries +- Ability to express your project configuration using a [Docker Compose YAML](/docs/concepts/compose.md) file +- Ability to manage [encrypted configuration values](/docs/concepts/configuration.md) +- Pre-configured environments with built-in [security](/docs/concepts/security.md), [networking](/docs/concepts/networking.mdx), and [observability](/docs/concepts/observability.md) +- [One-command deployments](/docs/getting-started/installing.md) +- Support for [GPUs](/docs/concepts/resources.md) +- Support for Infra-as-Code via the [Defang Pulumi provider](/docs/concepts/pulumi.md) diff --git a/docs/intro/intro.mdx b/docs/intro/intro.mdx new file mode 100644 index 000000000..db3274a3e --- /dev/null +++ b/docs/intro/intro.mdx @@ -0,0 +1,19 @@ +--- +sidebar_position: 100 +title: Overview +description: Overview of Defang, a radically simpler way to develop, deploy, and debug production-ready cloud apps. +--- + +import IntroGrid from "../../src/components/IntroGrid" + +#   + +
+ Defang Logo +

Defang Documentation

+

+ 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. +

+

Getting Started

+ +
diff --git a/docs/use-cases/use-cases.md b/docs/intro/use-cases.md similarity index 92% rename from docs/use-cases/use-cases.md rename to docs/intro/use-cases.md index 67ab4086c..b1f40f57b 100644 --- a/docs/use-cases/use-cases.md +++ b/docs/intro/use-cases.md @@ -1,10 +1,10 @@ --- -sidebar_position: 400 +sidebar_position: 300 title: Use Cases -description: Use cases for Defang. +description: Use cases for Defang --- -# Use Cases +# Defang Use Cases Defang can be used for a wide variety of use cases, generally in line with the [12 Factor architecture](https://12factor.net/). In this section we'll document some examples. At the end of this section we will also cover use cases that are not supported by Defang. @@ -26,7 +26,7 @@ LLMs (Large Language Models) are a type of AI model that can be used for a wide # Anti-patterns -While Defang is great for a wide variety of use cases, there are some use cases that are not a good fit for Defang. Generally, the use-cases that are Defang anti-patterns are the same as the ones that are [12 Factor](https://12factor.net/) anti-patterns. +While Defang is great for a wide variety of use cases, there are some use cases that are not a good fit for Defang. Generally, the use-cases that are Defang anti-patterns are the same as the ones that are [12 Factor](https://12factor.net/) anti-patterns. ## Stateful Services @@ -34,10 +34,10 @@ Some applications are designed to run in stateful environments. For example, a C ## Data Stores -Defang now offers support for stateful workloads through our [managed storage](./concepts/managed-storage) options, including [Postgres](./concepts/managed-storage/managed-postgres) and [Redis](./concepts/managed-storage/managed-redis) for data stores. However, we do not recommend using unsupported data stores with Defang, as this may lead to permanent data loss. +Defang now offers support for stateful workloads through our [managed storage](./concepts/managed-storage) options, including [Postgres](./concepts/managed-storage/managed-postgres) and [Redis](./concepts/managed-storage/managed-redis) for data stores. However, we do not recommend using unsupported data stores with Defang, as this may lead to permanent data loss. -:::info -To better serve our users, we will be introducing additional managed storage options, such as [Object Storage](concepts/managed-storage/managed-object-storage), in the near future. +:::info +To better serve our users, we will be introducing additional managed storage options, such as [Object Storage](concepts/managed-storage/managed-object-storage), in the near future. ::: Please be aware that if you choose not to use a Defang-supported [managed storage](./concepts/managed-storage) option, there is a risk that any data stored in a container may be lost if the container is replaced. diff --git a/docs/intro/what-is-defang.mdx b/docs/intro/what-is-defang.mdx new file mode 100644 index 000000000..537c416dd --- /dev/null +++ b/docs/intro/what-is-defang.mdx @@ -0,0 +1,17 @@ +--- +sidebar_position: 100 +title: What is Defang? +description: What is Defang? +--- + +# 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. + +- The [Defang CLI](/docs/getting-started/installing.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. diff --git a/docs/tutorials/deploy-to-playground.mdx b/docs/tutorials/deploy-to-playground.mdx new file mode 100644 index 000000000..65a475657 --- /dev/null +++ b/docs/tutorials/deploy-to-playground.mdx @@ -0,0 +1,59 @@ +--- +title: Deploy to Playground +description: Deploy to the Free Defang Playground +sidebar_position: 15 +--- + +# Deploy to the playground + +This tutorial will show you how to deploy your project to the Defang Playground. + +## Pre-requisites +* [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) +* [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) +* [A Defang Account](/docs/getting-started/authenticating) +* [The Defang CLI](/docs/getting-started/installing) + +## Step 1 - Navigate to your project directory +Head to the folder where your project is located. +```bash +$ cd path/to/your/project +``` + +## Step 2 - Deploy + +``` +$ defang up +``` + +If you have not used defang before, you'll be prompted to log in. + +``` + ! Please log in to continue. +Please visit http://127.0.0.1:49154 and log in. (Right click the URL or press ENTER to open browser) +``` + +:::info +To learn more about how authentication works in defang, check out the [authenticating page](/docs/getting-started/authenticating). +::: + +When you do this, you should see something similar to the output below: + +``` + * Uploading build context for app + * Deploying service app + * Monitor your services' status in the defang portal + - https://portal.defang.dev/service/app + * Tailing logs for deployment ID o59k89vk3qc8 ; press Ctrl+C to detach: + * Press V to toggle verbose mode +2024-09-19T10:50:53.572443-07:00 cd Update started for stack jordanstephens-prod1 +2024-09-19T10:51:05.536299-07:00 cd Update succeeded in 11.99769745s ; provisioning... +2024-09-19T10:51:39.419693-07:00 app Server running at http://0.0.0.0:3000/ + * Service app is in state DEPLOYMENT_COMPLETED and will be available at: + - https://jordanstephens-app--3000.prod1.defang.dev + * Done. +``` + +Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the defang portal. + +![screenshot of the defang portal](/img/getting-started-portal.png) diff --git a/docs/tutorials/deploy-to-your-cloud.mdx b/docs/tutorials/deploy-to-your-cloud.mdx index f66b773da..24055e497 100644 --- a/docs/tutorials/deploy-to-your-cloud.mdx +++ b/docs/tutorials/deploy-to-your-cloud.mdx @@ -1,5 +1,5 @@ --- -title: Deploy to your cloud +title: Deploy to Your Cloud description: Defang allows you deploy to your own cloud account. sidebar_position: 10 --- diff --git a/package-lock.json b/package-lock.json index 13a8be156..deeab4ecb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@docusaurus/core": "3.0.0", "@docusaurus/preset-classic": "3.0.0", + "@docusaurus/theme-common": "3.0.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mdx-js/react": "^3.0.0", diff --git a/package.json b/package.json index a39efe4d3..a274a601e 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "dependencies": { "@docusaurus/core": "3.0.0", "@docusaurus/preset-classic": "3.0.0", + "@docusaurus/theme-common": "3.0.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mdx-js/react": "^3.0.0", diff --git a/src/components/IntroGrid.tsx b/src/components/IntroGrid.tsx new file mode 100644 index 000000000..3cd7d0db0 --- /dev/null +++ b/src/components/IntroGrid.tsx @@ -0,0 +1,37 @@ + +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; +import type {PropSidebarItem} from '@docusaurus/plugin-content-docs'; + +const items: PropSidebarItem[] = [ + { + type: "link", + href: "/docs/intro/what-is-defang", + label: "Learn more about Defang", + description: "What is Defang and how does it work?", + }, + { + type: "link", + href: "/docs/category/cli", + label: "CLI Reference", + description: "Use the defang CLI to deploy your app", + }, + { + type: "link", + href: "/docs/tutorials/deploy-to-playground", + label: "Try Defang", + description: "Deploy to our free playground", + }, + { + type: "link", + href: "/docs/tutorials/deploy-to-your-cloud", + label: "Deploy to your own cloud", + description: "When you're ready for production", + }, +] + +export default function() { + + return ( + + ); +} From f85946d386fe63fa7bcd90110d7187f26eee5df3 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 29 Nov 2024 10:16:12 -0800 Subject: [PATCH 02/10] remove "build-and-deploy" doc --- docs/getting-started/build-and-deploy.md | 16 ---------------- docs/getting-started/getting-started.md | 1 - 2 files changed, 17 deletions(-) delete mode 100644 docs/getting-started/build-and-deploy.md diff --git a/docs/getting-started/build-and-deploy.md b/docs/getting-started/build-and-deploy.md deleted file mode 100644 index 0178b6120..000000000 --- a/docs/getting-started/build-and-deploy.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -sidebar_position: 300 -title: Build & Deploy Services -description: Build and deploy services with Defang. ---- - - -# Build and Deploy Services - -Defang supports various ways of creating and deploying services to the cloud. The following tutorials dive into each one in more detail: - -1. [Create an outline using AI](../tutorials/generate-new-code-using-ai.mdx) -2. [Build and deploy your code](../tutorials/deploy-code-compose.mdx) -3. [Deploy an existing container](../tutorials/deploy-container-using-the-cli.mdx) -4. [Deploy using Pulumi](../tutorials/deploy-using-pulumi.mdx) - diff --git a/docs/getting-started/getting-started.md b/docs/getting-started/getting-started.md index ce18273c5..3210988e9 100644 --- a/docs/getting-started/getting-started.md +++ b/docs/getting-started/getting-started.md @@ -103,7 +103,6 @@ Congratulations! You've successfully deployed your first service with Defang. No Defang supports various ways of creating and deploying services to the cloud. The following tutorials dive into each one in more detail: 1. [Deploy to your own cloud](/docs/tutorials/deploy-to-your-cloud) -1. [Update the code and redeploy](/docs/getting-started/build-and-deploy) 1. [Monitor your services](/docs/getting-started/monitor) 1. [Deploy an outline using AI](/docs/tutorials/generate-new-code-using-ai) 1. [Deploy existing containers](/docs/tutorials/deploy-container-using-the-cli) From 9194aef6c2ca8f02ea0ce395d12e512466e2672b Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 29 Nov 2024 10:16:25 -0800 Subject: [PATCH 03/10] make pulumi sidebar title less wordy --- docs/tutorials/deploy-using-pulumi.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/deploy-using-pulumi.mdx b/docs/tutorials/deploy-using-pulumi.mdx index 35e815da0..49b882a95 100644 --- a/docs/tutorials/deploy-using-pulumi.mdx +++ b/docs/tutorials/deploy-using-pulumi.mdx @@ -1,5 +1,5 @@ --- -title: Build and deploy using Pulumi +title: Deploy using Pulumi sidebar_position: 400 --- From f1810592d10d291fee2f95171ea19459f519f12b Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 29 Nov 2024 10:20:21 -0800 Subject: [PATCH 04/10] removing the "build and deploy code" doc i dont think this doc adds much value anymore now that we have more specialized docs for deploying samples, deploying to playground, and deploying to the various cloud providers --- docs/tutorials/deploy-code-compose.mdx | 70 -------------------------- 1 file changed, 70 deletions(-) delete mode 100644 docs/tutorials/deploy-code-compose.mdx diff --git a/docs/tutorials/deploy-code-compose.mdx b/docs/tutorials/deploy-code-compose.mdx deleted file mode 100644 index 73e05f7cd..000000000 --- a/docs/tutorials/deploy-code-compose.mdx +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: Build and deploy code -sidebar_position: 100 ---- - -# Deploy Code Using a Docker Compose File - -This tutorial assumes that the code normally gets built into a container and has a Dockerfile file in the current folder. - -If you already have a Docker Compose file for your service(s) you can use it directly. Here is a tutorial that shows you a simple example of how to deploy a node.js service using a Docker Compose file and a single js file. - -# Step 1 - Create main.js - -Let's create a simple node.js service which listens on port 3000 and returns a welcome message. Create a file called `main.js` with the following content: - -```javascript -const http = require('http'); - -const server = http.createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Welcome to Defang\n'); -}); - -server.listen(3000, '0.0.0.0', () => { - console.log('Server running at http://127.0.0.1:3000/'); -}); -``` - -# Step 2 - Create Dockerfile - -Let's create a Dockerfile to build the node.js service. We'll use the official Node runtime based on Alpine as a parent image. Create a file called `Dockerfile` with the following content: - -```dockerfile -# Use an official Node runtime based on Alpine as a parent image -FROM node:18-alpine - -# Set the working directory to /app -WORKDIR /app - -# Copy the current directory contents into the container at /app -COPY . . - -# Run the app when the container launches -ENTRYPOINT [ "node", "main.js" ] -``` - -# Step 3 - Create compose.yaml - -Let's create a Compose file to deploy the node.js service. We'll call the service minimal and expose port 3000. Create a file called `compose.yaml` with the following content: - -```yaml -version: '3.9' -services: - minimal: - build: - context: . - dockerfile: Dockerfile - ports: - - mode: ingress - target: 3000 -``` - -# Step 4 - Deploy - -Now that we have the code and the Docker Compose file, we can deploy the service using the `defang compose up` command. This will bundle the code into a container and deploy it with Defang. If you have [cloud credentials configured](../concepts/defang-byoc), the service will be deployed to AWS. If you don't have AWS credentials set up, the service will be deployed to [Defang Playground](../concepts/defang-playground). - -```sh -defang compose up -``` From b02b8aaa5b2a3851c7e840950105da512b35df91 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 29 Nov 2024 10:24:39 -0800 Subject: [PATCH 05/10] move the authentication doc from "getting-started" to "concepts" --- docs/concepts/accounts.md | 4 ++-- .../authenticating.md => concepts/authentication.md} | 8 ++++---- docs/getting-started/getting-started.md | 2 +- docs/tutorials/deploy-to-aws.mdx | 4 ++-- docs/tutorials/deploy-to-digitalocean.mdx | 2 +- docs/tutorials/deploy-to-playground.mdx | 4 ++-- docs/tutorials/deploy-using-pulumi.mdx | 2 +- static/samples.json | 6 +++--- 8 files changed, 16 insertions(+), 16 deletions(-) rename docs/{getting-started/authenticating.md => concepts/authentication.md} (88%) diff --git a/docs/concepts/accounts.md b/docs/concepts/accounts.md index 5e9334d36..39a40df28 100644 --- a/docs/concepts/accounts.md +++ b/docs/concepts/accounts.md @@ -16,7 +16,7 @@ Eventually, billing and payment information will be associated with your account ## Creating an Account -To create an account, simply login to Defang and accept the [terms of service](https://defang.io/terms-service.html) using the [CLI](../getting-started/authenticating.md). +To create an account, simply login to Defang and accept the [terms of service](https://defang.io/terms-service.html) using the [CLI](/docs/concepts/authentication.md). At the moment, the only way to authenticate with Defang is through GitHub. We plan to offer other authentication providers in the future. @@ -34,4 +34,4 @@ Keep in mind that your Defang account is separate from your [cloud provider acco :::info We plan to introduce a more robust system for managing accounts, permissions, service groups, etc. in the future. -::: \ No newline at end of file +::: diff --git a/docs/getting-started/authenticating.md b/docs/concepts/authentication.md similarity index 88% rename from docs/getting-started/authenticating.md rename to docs/concepts/authentication.md index 2217723d0..bf494620b 100644 --- a/docs/getting-started/authenticating.md +++ b/docs/concepts/authentication.md @@ -1,10 +1,10 @@ --- sidebar_position: 200 -title: Authenticating -description: Authenticate with Defang. +title: Authentication +description: Authenticating with Defang. --- -# Authenticating +# Authenticating with Defang To do pretty much anything with Defang, you'll need to authenticate with the platform. You can do this by running the following command: @@ -16,4 +16,4 @@ This will prompt you to open a browser and log into your Defang account. For now :::warning Keep in mind that your Defang account is separate from your [cloud provider account](../concepts/defang-byoc.md). You will need to authenticate with your cloud provider account separately to deploy services to your own cloud account. -::: \ No newline at end of file +::: diff --git a/docs/getting-started/getting-started.md b/docs/getting-started/getting-started.md index 3210988e9..82fc26aa0 100644 --- a/docs/getting-started/getting-started.md +++ b/docs/getting-started/getting-started.md @@ -72,7 +72,7 @@ Please visit http://127.0.0.1:49154 and log in. (Right click the URL or press EN ``` :::info -To learn more about how authentication works in defang, check out the [authenticating page](/docs/getting-started/authenticating). +To learn more about how authentication works in defang, check out the [authenticating page](/docs/concepts/authentication). ::: When you do this, you should see something similar to the output below: diff --git a/docs/tutorials/deploy-to-aws.mdx b/docs/tutorials/deploy-to-aws.mdx index 5e4c60aea..6c40606cb 100644 --- a/docs/tutorials/deploy-to-aws.mdx +++ b/docs/tutorials/deploy-to-aws.mdx @@ -11,7 +11,7 @@ This tutorial will show you how to deploy your services to your own AWS account ## Pre-requisites * [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) * [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) -* [A Defang Account](/docs/getting-started/authenticating) +* [A Defang Account](/docs/concepts/authentication) * [The Defang CLI](/docs/getting-started/installing) * [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html) @@ -23,7 +23,7 @@ $ cd path/to/your/project ## Step 2 - Authenticate Defang to use your AWS Account -There are many ways to authenticate your [AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html). +There are many ways to authenticate your [AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html). Once you've done that, Defang will look for your AWS credentials in your shell environment and expect to find one of the following credential sets: * the `AWS_PROFILE` environment variable * or, the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables diff --git a/docs/tutorials/deploy-to-digitalocean.mdx b/docs/tutorials/deploy-to-digitalocean.mdx index dd92832a2..57d06e439 100644 --- a/docs/tutorials/deploy-to-digitalocean.mdx +++ b/docs/tutorials/deploy-to-digitalocean.mdx @@ -11,7 +11,7 @@ This tutorial will show you how to deploy your services to your own DigitalOcean ## Pre-requisites * [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) * [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) -* [A Defang Account](/docs/getting-started/authenticating) +* [A Defang Account](/docs/concepts/authentication) * [The Defang CLI](/docs/getting-started/installing) * [DigitalOcean Account Credentials](/docs/providers/digitalocean#getting-started) * [DigitalOcean Spaces Access Keys](/docs/providers/digitalocean#getting-started) diff --git a/docs/tutorials/deploy-to-playground.mdx b/docs/tutorials/deploy-to-playground.mdx index 65a475657..b92f18316 100644 --- a/docs/tutorials/deploy-to-playground.mdx +++ b/docs/tutorials/deploy-to-playground.mdx @@ -11,7 +11,7 @@ This tutorial will show you how to deploy your project to the Defang Playground. ## Pre-requisites * [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) * [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) -* [A Defang Account](/docs/getting-started/authenticating) +* [A Defang Account](/docs/concepts/authentication) * [The Defang CLI](/docs/getting-started/installing) ## Step 1 - Navigate to your project directory @@ -34,7 +34,7 @@ Please visit http://127.0.0.1:49154 and log in. (Right click the URL or press EN ``` :::info -To learn more about how authentication works in defang, check out the [authenticating page](/docs/getting-started/authenticating). +To learn more about how authentication works in defang, check out the [authenticating page](/docs/concepts/authentication). ::: When you do this, you should see something similar to the output below: diff --git a/docs/tutorials/deploy-using-pulumi.mdx b/docs/tutorials/deploy-using-pulumi.mdx index 49b882a95..5db3b81a5 100644 --- a/docs/tutorials/deploy-using-pulumi.mdx +++ b/docs/tutorials/deploy-using-pulumi.mdx @@ -11,7 +11,7 @@ sidebar_position: 400 Make sure to install the [Pulumi CLI](https://www.pulumi.com/docs/install/) and the [Defang CLI](../getting-started/installing.md). -Make sure you are logged into the [Defang CLI](../getting-started/authenticating.md). Don't worry about the Pulumi CLI for now. +Make sure you are logged into the [Defang CLI](/docs/concepts/authentication.md). Don't worry about the Pulumi CLI for now. ## Project Directory Setup diff --git a/static/samples.json b/static/samples.json index 81da04960..6abe044dc 100644 --- a/static/samples.json +++ b/static/samples.json @@ -82,7 +82,7 @@ { "name": "nextjs", "category": "nodejs", - "readme": "# Next.js × Defang\n\nA basic Next.js app with a Dockerfile and docker-compose ready to deploy to AWS with [Defang](https://defang.io).\n\n## Steps\n\n1. [Install Defang](https://docs.defang.io/docs/getting-started/installing)\n2. [Authenticate with Defang](https://docs.defang.io/docs/getting-started/authenticating)\n3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n4. Run `defang compose up` in the root of this project" + "readme": "# Next.js × Defang\n\nA basic Next.js app with a Dockerfile and docker-compose ready to deploy to AWS with [Defang](https://defang.io).\n\n## Steps\n\n1. [Install Defang](https://docs.defang.io/docs/getting-started/installing)\n2. [Authenticate with Defang](https://docs.defang.io/docs/concepts/authentication)\n3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n4. Run `defang compose up` in the root of this project" }, { "name": "nextjs-boilerplate", @@ -92,7 +92,7 @@ { "name": "nextjs-github-actions", "category": "nodejs", - "readme": "# Next.js × Defang\n\nA basic Next.js app with a Dockerfile and docker-compose ready to deploy to AWS with [Defang](https://defang.io).\n\n## Steps\n\n1. [Install Defang](https://docs.defang.io/docs/getting-started/installing)\n2. [Authenticate with Defang](https://docs.defang.io/docs/getting-started/authenticating)\n3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n4. Run `defang compose up` in the root of this project" + "readme": "# Next.js × Defang\n\nA basic Next.js app with a Dockerfile and docker-compose ready to deploy to AWS with [Defang](https://defang.io).\n\n## Steps\n\n1. [Install Defang](https://docs.defang.io/docs/getting-started/installing)\n2. [Authenticate with Defang](https://docs.defang.io/docs/concepts/authentication)\n3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n4. Run `defang compose up` in the root of this project" }, { "name": "remix-aiven-postgres", @@ -169,4 +169,4 @@ "category": "ruby", "readme": "\nThis template is a member list project developed using Ruby on Rails, offering a starting point to help you quickly build your team management system. We have prepared all the essential files for deployment. By spending less than 10 minutes setting up the environment, as detailed in the prerequisites, and executing the commands in our step-by-step guide, your website will be ready to go live to the world!\n\n## NOTE\n1. This sample showcases how you could deploy a full-stack application with Defang in Ruby on Rails. However, it uses a SQLite database, which isn't production-ready and will be reset with every deployment. For production use cases you should use a managed database like RDS, Aiven, or others. If you stick to Rail's default SQLite database, your stored data will be lost on every deployment, and in some other cases. In the future, Defang will help you provision and connect to managed databases.\n\n## Essential Setup Files\n1. A Dockerfile to describe the basic image of your applications.\n2. A docker-compose file to define and run multi-container Docker applications.\n3. A .dockerignore file to comply with the size limit (10MB).\n\n## Prerequisite\n1. Download Defang CLI\n2. If you are using Defang BYOC, make sure you have properly authenticated your AWS account\nPlus, make sure that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.\n\n## A Step-by-Step Guide\n1. Open the terminal and type `defang login`\n2. Type `defang compose up` in the CLI\n3. Now your application will be launched\n" } -] \ No newline at end of file +] From ad6aae18e3b4376aa6fb59903c3115c2b9f2333c Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 29 Nov 2024 10:29:35 -0800 Subject: [PATCH 06/10] move installing page into "Getting Started" --- blog/2024-03-28-slackbot-sample.md | 2 +- docs/concepts/authentication.md | 2 +- docs/concepts/generate.md | 2 +- docs/getting-started/getting-started.md | 53 ++++++++++++++++++- docs/getting-started/installing.md | 58 --------------------- docs/intro/features.mdx | 2 +- docs/intro/what-is-defang.mdx | 2 +- docs/tutorials/deploy-to-aws.mdx | 2 +- docs/tutorials/deploy-to-digitalocean.mdx | 2 +- docs/tutorials/deploy-to-playground.mdx | 2 +- docs/tutorials/deploy-using-pulumi.mdx | 2 +- docs/tutorials/deploy-with-gpu.mdx | 2 +- docs/tutorials/use-your-own-domain-name.mdx | 4 +- src/components/Samples/index.tsx | 2 +- static/samples.json | 4 +- 15 files changed, 66 insertions(+), 75 deletions(-) delete mode 100644 docs/getting-started/installing.md diff --git a/blog/2024-03-28-slackbot-sample.md b/blog/2024-03-28-slackbot-sample.md index 089519d30..37fe3a4f9 100644 --- a/blog/2024-03-28-slackbot-sample.md +++ b/blog/2024-03-28-slackbot-sample.md @@ -11,7 +11,7 @@ Hey folks! Today, I'm going to share one of our code samples that will show you Before we dive into the details, let's make sure you have everything you need to get started: -1. **Install Defang CLI:** Simplify your deployment process by installing the Defang CLI tool. Follow the instructions [here](https://docs.defang.io/docs/getting-started/installing) to get it up and running quickly. +1. **Install Defang CLI:** Simplify your deployment process by installing the Defang CLI tool. Follow the instructions [here](https://docs.defang.io/docs/getting-started#install-the-defang-cli) to get it up and running quickly. 2. **Slack API Token:** Create a Slack App at https://api.slack.com/apps, granting it the necessary permissions, including the bot `chat:write` scope. ![screenshot of the slack admin UI showing the bot scopes](/img/slackbot-sample/scopes.png) diff --git a/docs/concepts/authentication.md b/docs/concepts/authentication.md index bf494620b..3410c757c 100644 --- a/docs/concepts/authentication.md +++ b/docs/concepts/authentication.md @@ -15,5 +15,5 @@ defang login This will prompt you to open a browser and log into your Defang account. For now, the only way to login is with GitHub, though we will offer other providers to authenticate in the future. Once you've logged in, you can close the browser and return to the terminal. You should see a message that you've successfully logged in. :::warning -Keep in mind that your Defang account is separate from your [cloud provider account](../concepts/defang-byoc.md). You will need to authenticate with your cloud provider account separately to deploy services to your own cloud account. +Keep in mind that your Defang account is separate from your [cloud provider account](/docs/concepts/defang-byoc). You will need to authenticate with your cloud provider account separately to deploy services to your own cloud account. ::: diff --git a/docs/concepts/generate.md b/docs/concepts/generate.md index c83c66c48..7649c77f8 100644 --- a/docs/concepts/generate.md +++ b/docs/concepts/generate.md @@ -6,7 +6,7 @@ sidebar_position: 100 # Generate -Defang includes an AI-driven agent that translates natural language prompts to an outline for your project that you can then refine. The AI agent is available through the [Defang CLI](../getting-started/installing.md). +Defang includes an AI-driven agent that translates natural language prompts to an outline for your project that you can then refine. The AI agent is available through the [Defang CLI](../getting-started#install-the-defang-cli.md). :::info The AI agent is currently in preview and only supports a limited set of prompts, varying in complexity. We plan to expand the capabilities of the AI agent in the future. diff --git a/docs/getting-started/getting-started.md b/docs/getting-started/getting-started.md index 82fc26aa0..bc6e69c79 100644 --- a/docs/getting-started/getting-started.md +++ b/docs/getting-started/getting-started.md @@ -4,12 +4,61 @@ title: Getting Started description: Get started with Defang. --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Getting Started +## Install the Defang CLI + +Defang doesn't require installing anything in your cloud, but you will need to install the [open source](https://github.com/DefangLabs/defang) Defang command line interface (CLI) to interact with your Defang resources and account. + +We offer a few different ways to install the Defang CLI. You can use a shell script, Homebrew, Winget, or you can download the binary directly. + + + + + **Using a shell script** + + You can install the Defang CLI using a shell script. Run the following command in your terminal: + + ```bash + eval "$(curl -fsSL s.defang.io/install)" + ``` + + The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. + + + **Using Homebrew** + + You can easily install the Defang CLI using [Homebrew](https://brew.sh/). Run the following command in your terminal: + + ```bash + brew install DefangLabs/defang/defang + ``` + + + **Using Winget** + + On Windows, you can install the Defang CLI using `winget`. Run the following command in your terminal: + + ```powershell + winget install defang + ``` + + + **Using Nix** -## Install the CLI + ```bash + nix profile install github:DefangLabs/defang#defang-bin --refresh + ``` + + + **Direct Download** -First, you'll need to install the Defang CLI. The CLI is the primary way to interact with Defang. It allows you to create, deploy, and manage your services. You can find the [different installation methods here](./installing.md). + You can find the latest version of the Defang CLI on the [latest release page](https://github.com/DefangLabs/defang/releases/latest). Just download the appropriate binary for your operating system and architecture, and put it somewhere in your `PATH`. + + ## Generate a project diff --git a/docs/getting-started/installing.md b/docs/getting-started/installing.md deleted file mode 100644 index e3350f4b3..000000000 --- a/docs/getting-started/installing.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -sidebar_position: 100 -title: Installing -description: How to install Defang. ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# How to Install Defang - -Defang doesn't require installing anything in your cloud, but you will need to install the [open source](https://github.com/DefangLabs/defang) Defang command line interface (CLI) to interact with your Defang resources and account. - -We offer a few different ways to install the Defang CLI. You can use a shell script, Homebrew, Winget, or you can download the binary directly. - - - - - **Using a shell script** - - You can install the Defang CLI using a shell script. Run the following command in your terminal: - - ```bash - eval "$(curl -fsSL s.defang.io/install)" - ``` - - The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. - - - **Using Homebrew** - - You can easily install the Defang CLI using [Homebrew](https://brew.sh/). Run the following command in your terminal: - - ```bash - brew install DefangLabs/defang/defang - ``` - - - **Using Winget** - - On Windows, you can install the Defang CLI using `winget`. Run the following command in your terminal: - - ```powershell - winget install defang - ``` - - - **Using Nix** - - ```bash - nix profile install github:DefangLabs/defang#defang-bin --refresh - ``` - - - **Direct Download** - - You can find the latest version of the Defang CLI on the [latest release page](https://github.com/DefangLabs/defang/releases/latest). Just download the appropriate binary for your operating system and architecture, and put it somewhere in your `PATH`. - - diff --git a/docs/intro/features.mdx b/docs/intro/features.mdx index ffb36cfc8..0f179fc85 100644 --- a/docs/intro/features.mdx +++ b/docs/intro/features.mdx @@ -17,6 +17,6 @@ Defang provides a streamlined experience to develop, deploy, observe, and update - Ability to express your project configuration using a [Docker Compose YAML](/docs/concepts/compose.md) file - Ability to manage [encrypted configuration values](/docs/concepts/configuration.md) - Pre-configured environments with built-in [security](/docs/concepts/security.md), [networking](/docs/concepts/networking.mdx), and [observability](/docs/concepts/observability.md) -- [One-command deployments](/docs/getting-started/installing.md) +- [One-command deployments](/docs/getting-started#install-the-defang-cli.md) - Support for [GPUs](/docs/concepts/resources.md) - Support for Infra-as-Code via the [Defang Pulumi provider](/docs/concepts/pulumi.md) diff --git a/docs/intro/what-is-defang.mdx b/docs/intro/what-is-defang.mdx index 537c416dd..3228c100f 100644 --- a/docs/intro/what-is-defang.mdx +++ b/docs/intro/what-is-defang.mdx @@ -10,7 +10,7 @@ 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. -- The [Defang CLI](/docs/getting-started/installing.md) includes an AI-driven agent that translates natural language prompts to an outline for your project that you can then refine. +- 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. diff --git a/docs/tutorials/deploy-to-aws.mdx b/docs/tutorials/deploy-to-aws.mdx index 6c40606cb..925d96024 100644 --- a/docs/tutorials/deploy-to-aws.mdx +++ b/docs/tutorials/deploy-to-aws.mdx @@ -12,7 +12,7 @@ This tutorial will show you how to deploy your services to your own AWS account * [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) * [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) * [A Defang Account](/docs/concepts/authentication) -* [The Defang CLI](/docs/getting-started/installing) +* [The Defang CLI](/docs/getting-started#install-the-defang-cli) * [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html) ## Step 1 - Navigate to your project directory diff --git a/docs/tutorials/deploy-to-digitalocean.mdx b/docs/tutorials/deploy-to-digitalocean.mdx index 57d06e439..49121fc46 100644 --- a/docs/tutorials/deploy-to-digitalocean.mdx +++ b/docs/tutorials/deploy-to-digitalocean.mdx @@ -12,7 +12,7 @@ This tutorial will show you how to deploy your services to your own DigitalOcean * [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) * [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) * [A Defang Account](/docs/concepts/authentication) -* [The Defang CLI](/docs/getting-started/installing) +* [The Defang CLI](/docs/getting-started#install-the-defang-cli) * [DigitalOcean Account Credentials](/docs/providers/digitalocean#getting-started) * [DigitalOcean Spaces Access Keys](/docs/providers/digitalocean#getting-started) diff --git a/docs/tutorials/deploy-to-playground.mdx b/docs/tutorials/deploy-to-playground.mdx index b92f18316..974faf83d 100644 --- a/docs/tutorials/deploy-to-playground.mdx +++ b/docs/tutorials/deploy-to-playground.mdx @@ -12,7 +12,7 @@ This tutorial will show you how to deploy your project to the Defang Playground. * [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) * [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) * [A Defang Account](/docs/concepts/authentication) -* [The Defang CLI](/docs/getting-started/installing) +* [The Defang CLI](/docs/getting-started#install-the-defang-cli) ## Step 1 - Navigate to your project directory Head to the folder where your project is located. diff --git a/docs/tutorials/deploy-using-pulumi.mdx b/docs/tutorials/deploy-using-pulumi.mdx index 5db3b81a5..d69d2ce5d 100644 --- a/docs/tutorials/deploy-using-pulumi.mdx +++ b/docs/tutorials/deploy-using-pulumi.mdx @@ -9,7 +9,7 @@ sidebar_position: 400 ## Installing Dependencies -Make sure to install the [Pulumi CLI](https://www.pulumi.com/docs/install/) and the [Defang CLI](../getting-started/installing.md). +Make sure to install the [Pulumi CLI](https://www.pulumi.com/docs/install/) and the [Defang CLI](../getting-started#install-the-defang-cli.md). Make sure you are logged into the [Defang CLI](/docs/concepts/authentication.md). Don't worry about the Pulumi CLI for now. diff --git a/docs/tutorials/deploy-with-gpu.mdx b/docs/tutorials/deploy-with-gpu.mdx index 87b9cdd99..ea6865d71 100644 --- a/docs/tutorials/deploy-with-gpu.mdx +++ b/docs/tutorials/deploy-with-gpu.mdx @@ -31,7 +31,7 @@ You'll need to clone [this sample](https://github.com/DefangLabs/samples/tree/ma ## Step 2 - Check your [Defang BYOC](../concepts/defang-byoc.md) settings -* Make sure you [install the latest version of the Defang CLI](../getting-started/installing.md) +* Make sure you [install the latest version of the Defang CLI](../getting-started#install-the-defang-cli.md) * Then, make sure you have properly [authenticated your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). The Defang CLI makes use of AWS environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`, so make sure the correct values are set for those. :::tip diff --git a/docs/tutorials/use-your-own-domain-name.mdx b/docs/tutorials/use-your-own-domain-name.mdx index 7adc18fd1..fe40b147e 100644 --- a/docs/tutorials/use-your-own-domain-name.mdx +++ b/docs/tutorials/use-your-own-domain-name.mdx @@ -12,7 +12,7 @@ In our latest version of [Defang BYOC](https://docs.defang.io/docs/concepts/defa ## Step 1 - Check your [Defang BYOC](../concepts/defang-byoc.md) settings -* Make sure you [install the latest version of the Defang CLI](../getting-started/installing.md) +* Make sure you [install the latest version of the Defang CLI](../getting-started#install-the-defang-cli.md) * Then, make sure you have properly [authenticated your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). The Defang CLI makes use of AWS environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`, so make sure the correct values are set for those. If you use the AWS CLI, you can verify that your are authenticated against AWS using the following command (note that the AWS CLI itself is not required to use the defang cli in BYOC mode): @@ -67,4 +67,4 @@ defang compose up This will deploy your service and set up the necessary DNS records in Route 53 as seen in the screenshot below as well as provision SSL certificates. You can now access your service at the domain you specified in your compose file. -Route 53 DNS Records Screenshot \ No newline at end of file +Route 53 DNS Records Screenshot diff --git a/src/components/Samples/index.tsx b/src/components/Samples/index.tsx index b14a29edb..843944777 100644 --- a/src/components/Samples/index.tsx +++ b/src/components/Samples/index.tsx @@ -179,7 +179,7 @@ export default function Samples() { {/* */} - Use this sample (requires Defang CLI v0.5.21 or later) + Use this sample (requires Defang CLI v0.5.21 or later) {`defang generate ${selectedSample.name}`} diff --git a/static/samples.json b/static/samples.json index 6abe044dc..8ddc65bba 100644 --- a/static/samples.json +++ b/static/samples.json @@ -82,7 +82,7 @@ { "name": "nextjs", "category": "nodejs", - "readme": "# Next.js × Defang\n\nA basic Next.js app with a Dockerfile and docker-compose ready to deploy to AWS with [Defang](https://defang.io).\n\n## Steps\n\n1. [Install Defang](https://docs.defang.io/docs/getting-started/installing)\n2. [Authenticate with Defang](https://docs.defang.io/docs/concepts/authentication)\n3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n4. Run `defang compose up` in the root of this project" + "readme": "# Next.js × Defang\n\nA basic Next.js app with a Dockerfile and docker-compose ready to deploy to AWS with [Defang](https://defang.io).\n\n## Steps\n\n1. [Install Defang](https://docs.defang.io/docs/getting-started#install-the-defang-cli)\n2. [Authenticate with Defang](https://docs.defang.io/docs/concepts/authentication)\n3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n4. Run `defang compose up` in the root of this project" }, { "name": "nextjs-boilerplate", @@ -92,7 +92,7 @@ { "name": "nextjs-github-actions", "category": "nodejs", - "readme": "# Next.js × Defang\n\nA basic Next.js app with a Dockerfile and docker-compose ready to deploy to AWS with [Defang](https://defang.io).\n\n## Steps\n\n1. [Install Defang](https://docs.defang.io/docs/getting-started/installing)\n2. [Authenticate with Defang](https://docs.defang.io/docs/concepts/authentication)\n3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n4. Run `defang compose up` in the root of this project" + "readme": "# Next.js × Defang\n\nA basic Next.js app with a Dockerfile and docker-compose ready to deploy to AWS with [Defang](https://defang.io).\n\n## Steps\n\n1. [Install Defang](https://docs.defang.io/docs/getting-started#install-the-defang-cli)\n2. [Authenticate with Defang](https://docs.defang.io/docs/concepts/authentication)\n3. (optional) [Authenticate with AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n4. Run `defang compose up` in the root of this project" }, { "name": "remix-aiven-postgres", From 9fa32c31edb0997fe3f519acddbc7c312d110993 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 29 Nov 2024 10:37:41 -0800 Subject: [PATCH 07/10] move monitoring and updating docs into tutorials --- docs/getting-started/getting-started.md | 160 ------------------------ docs/getting-started/monitor.md | 25 ---- docs/getting-started/update.md | 13 -- docs/intro/features.mdx | 22 ++-- docs/intro/use-cases.md | 6 +- 5 files changed, 14 insertions(+), 212 deletions(-) delete mode 100644 docs/getting-started/getting-started.md delete mode 100644 docs/getting-started/monitor.md delete mode 100644 docs/getting-started/update.md diff --git a/docs/getting-started/getting-started.md b/docs/getting-started/getting-started.md deleted file mode 100644 index bc6e69c79..000000000 --- a/docs/getting-started/getting-started.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -sidebar_position: 200 -title: Getting Started -description: Get started with Defang. ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Getting Started - -## Install the Defang CLI - -Defang doesn't require installing anything in your cloud, but you will need to install the [open source](https://github.com/DefangLabs/defang) Defang command line interface (CLI) to interact with your Defang resources and account. - -We offer a few different ways to install the Defang CLI. You can use a shell script, Homebrew, Winget, or you can download the binary directly. - - - - - **Using a shell script** - - You can install the Defang CLI using a shell script. Run the following command in your terminal: - - ```bash - eval "$(curl -fsSL s.defang.io/install)" - ``` - - The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. - - - **Using Homebrew** - - You can easily install the Defang CLI using [Homebrew](https://brew.sh/). Run the following command in your terminal: - - ```bash - brew install DefangLabs/defang/defang - ``` - - - **Using Winget** - - On Windows, you can install the Defang CLI using `winget`. Run the following command in your terminal: - - ```powershell - winget install defang - ``` - - - **Using Nix** - - ```bash - nix profile install github:DefangLabs/defang#defang-bin --refresh - ``` - - - **Direct Download** - - You can find the latest version of the Defang CLI on the [latest release page](https://github.com/DefangLabs/defang/releases/latest). Just download the appropriate binary for your operating system and architecture, and put it somewhere in your `PATH`. - - - -## Generate a project - -``` -$ defang generate nodejs-http -``` - -You should see the following prompt: -``` -? What folder would you like to create the project in? -``` -Type in the name of the folder you'd like to use for your new project and press ENTER. - -I'll type `"welcome-to-defang"`. Now, you'll see the following output: - -``` -? What folder would you like to create the project in? welcome-to-defang - * Fetching sample from the Defang repository... - * Writing files to disk... - - .github/ - - .github/workflows/ - - .github/workflows/deploy.yaml - - README.md - - app/ - - app/Dockerfile - - app/main.js - - compose.yaml - * Code generated successfully in folder welcome-to-defang - -Check the files in your favorite editor. -To deploy the service, do `cd welcome-to-defang` and - - defang compose up -``` - -Now, navigate to the folder you just created: - -``` -$ cd welcome-to-defang -``` - -You can open the folder in your favorite editor and see the files that were generated for you: -* The `app` folder contains the code for your service. -* The `Dockerfile` is used to build the container image for your service. -* The `compose.yaml` file is used to define the services you want to deploy. - -## Deploy to the playground - -Go back to your shell and type the following: - -``` -$ defang up -``` - -If you have not used defang before, you'll be prompted to log in. - -``` - ! Please log in to continue. -Please visit http://127.0.0.1:49154 and log in. (Right click the URL or press ENTER to open browser) -``` - -:::info -To learn more about how authentication works in defang, check out the [authenticating page](/docs/concepts/authentication). -::: - -When you do this, you should see something similar to the output below: - -``` - * Uploading build context for app - * Deploying service app - * Monitor your services' status in the defang portal - - https://portal.defang.dev/service/app - * Tailing logs for deployment ID o59k89vk3qc8 ; press Ctrl+C to detach: - * Press V to toggle verbose mode -2024-09-19T10:50:53.572443-07:00 cd Update started for stack jordanstephens-prod1 -2024-09-19T10:51:05.536299-07:00 cd Update succeeded in 11.99769745s ; provisioning... -2024-09-19T10:51:39.419693-07:00 app Server running at http://0.0.0.0:3000/ - * Service app is in state DEPLOYMENT_COMPLETED and will be available at: - - https://jordanstephens-app--3000.prod1.defang.dev - * Done. -``` - -Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the defang portal. - -![screenshot of the defang portal](/img/getting-started-portal.png) - -## Next Steps - -Congratulations! You've successfully deployed your first service with Defang. Now, where do you go from here? - -Defang supports various ways of creating and deploying services to the cloud. The following tutorials dive into each one in more detail: - -1. [Deploy to your own cloud](/docs/tutorials/deploy-to-your-cloud) -1. [Monitor your services](/docs/getting-started/monitor) -1. [Deploy an outline using AI](/docs/tutorials/generate-new-code-using-ai) -1. [Deploy existing containers](/docs/tutorials/deploy-container-using-the-cli) -1. [Deploy using Pulumi](/docs/tutorials/deploy-using-pulumi) - -Choose the direction that seems the most interesting. If you have any questions, join the [Defang Discord](https://discord.gg/defang) and we'll be happy to help you out. diff --git a/docs/getting-started/monitor.md b/docs/getting-started/monitor.md deleted file mode 100644 index 21c949c80..000000000 --- a/docs/getting-started/monitor.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -sidebar_position: 400 -title: Monitor Services -description: Monitor services with Defang. ---- - -# Monitor a Service - -By default, all the output (stdout and stderr) from your app is logged. You can view these logs in real-time. You can view logs for all your services, one service, or even one specific deployment of a service. - -- From the CLI: - - ```tsx - defang tail --name service1 - ``` - -- From the Defang Portal: - - [https://portal.defang.dev/](https://portal.defang.dev/) - - -:::info -* To learn more about observability in Defang, check out the [observability page](../concepts/observability.md). -* Note that the Defang Portal only displays services deployed to Defang Playground. -::: \ No newline at end of file diff --git a/docs/getting-started/update.md b/docs/getting-started/update.md deleted file mode 100644 index b26ae32c3..000000000 --- a/docs/getting-started/update.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -sidebar_position: 500 -title: Update Services -description: Update services with Defang. ---- - -# Update Services - -To update your app (for example, updating the base image of your container, or making changes to your code) you can run the `defang compose up` command and it will build and deploy a new version with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped. - -:::info -If you are using [compose files](../concepts/compose.md) to define your services, you can add/remove services, make changes to code, etc. When you run `defang compose up`, the update will be diffed against the current state and any necessary changes will be applied to make the current state match the desired state. -::: \ No newline at end of file diff --git a/docs/intro/features.mdx b/docs/intro/features.mdx index 0f179fc85..982022b9a 100644 --- a/docs/intro/features.mdx +++ b/docs/intro/features.mdx @@ -8,15 +8,15 @@ description: Defang Features Defang provides a streamlined experience to develop, deploy, observe, and update your cloud applications. Defang includes the following features: -- Support for [various types of applications](/docs/use-cases): Web services and APIs, mobile app backends, ML services, hosting LLMs, etc. +- Support for [various types of applications](/docs/intro/use-cases): Web services and APIs, mobile app backends, ML services, hosting LLMs, etc. - Support for your programming [language of choice](/docs/samples): Node.js, Python, Golang, or anything else you can package in a Dockerfile. -- Built-in AI agent to go [from natural language prompt to an outline project](/docs/concepts/generate.md) -- Built-in AI agent to help you [debug your cloud applications](/docs/concepts/debug.md) -- Automated [Dockerfile builds](/docs/concepts/deployments.md) -- Support for [pre-built Docker containers](/docs/tutorials/deploy-container-using-the-cli.mdx), from public or private image registries -- Ability to express your project configuration using a [Docker Compose YAML](/docs/concepts/compose.md) file -- Ability to manage [encrypted configuration values](/docs/concepts/configuration.md) -- Pre-configured environments with built-in [security](/docs/concepts/security.md), [networking](/docs/concepts/networking.mdx), and [observability](/docs/concepts/observability.md) -- [One-command deployments](/docs/getting-started#install-the-defang-cli.md) -- Support for [GPUs](/docs/concepts/resources.md) -- Support for Infra-as-Code via the [Defang Pulumi provider](/docs/concepts/pulumi.md) +- Built-in AI agent to go [from natural language prompt to an outline project](/docs/concepts/generate) +- Built-in AI agent to help you [debug your cloud applications](/docs/concepts/debug) +- Automated [Dockerfile builds](/docs/concepts/deployments) +- Support for [pre-built Docker containers](/docs/tutorials/deploy-container-using-the-cli), from public or private image registries +- Ability to express your project configuration using a [Docker Compose YAML](/docs/concepts/compose) file +- Ability to manage [encrypted configuration values](/docs/concepts/configuration) +- Pre-configured environments with built-in [security](/docs/concepts/security), [networking](/docs/concepts/networking), and [observability](/docs/concepts/observability) +- [One-command deployments](/docs/getting-started#install-the-defang-cli) +- Support for [GPUs](/docs/concepts/resources) +- Support for Infra-as-Code via the [Defang Pulumi provider](/docs/concepts/pulumi) diff --git a/docs/intro/use-cases.md b/docs/intro/use-cases.md index b1f40f57b..0c3dced6b 100644 --- a/docs/intro/use-cases.md +++ b/docs/intro/use-cases.md @@ -34,10 +34,10 @@ Some applications are designed to run in stateful environments. For example, a C ## Data Stores -Defang now offers support for stateful workloads through our [managed storage](./concepts/managed-storage) options, including [Postgres](./concepts/managed-storage/managed-postgres) and [Redis](./concepts/managed-storage/managed-redis) for data stores. However, we do not recommend using unsupported data stores with Defang, as this may lead to permanent data loss. +Defang now offers support for stateful workloads through our [managed storage](/docs/concepts/managed-storage) options, including [Postgres](/docs/concepts/managed-storage/managed-postgres) and [Redis](/docs/concepts/managed-storage/managed-redis) for data stores. However, we do not recommend using unsupported data stores with Defang, as this may lead to permanent data loss. :::info -To better serve our users, we will be introducing additional managed storage options, such as [Object Storage](concepts/managed-storage/managed-object-storage), in the near future. +To better serve our users, we will be introducing additional managed storage options, such as [Object Storage](/docs/concepts/managed-storage/managed-object-storage), in the near future. ::: -Please be aware that if you choose not to use a Defang-supported [managed storage](./concepts/managed-storage) option, there is a risk that any data stored in a container may be lost if the container is replaced. +Please be aware that if you choose not to use a Defang-supported [managed storage](/docs/concepts/managed-storage) option, there is a risk that any data stored in a container may be lost if the container is replaced. From 66d1fe46f1bf8aa28eefa2c5beb8bfb60c600f42 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Fri, 29 Nov 2024 10:47:13 -0800 Subject: [PATCH 08/10] use a grid for "next steps" after "getting started" --- docs/getting-started.mdx | 196 +++++++++++++++++++++ docs/intro/intro.mdx | 31 +++- docs/tutorials/monitoring-your-services.md | 25 +++ docs/tutorials/updating-your-services.md | 13 ++ src/components/IntroGrid.tsx | 25 +-- 5 files changed, 264 insertions(+), 26 deletions(-) create mode 100644 docs/getting-started.mdx create mode 100644 docs/tutorials/monitoring-your-services.md create mode 100644 docs/tutorials/updating-your-services.md diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx new file mode 100644 index 000000000..3cadf393c --- /dev/null +++ b/docs/getting-started.mdx @@ -0,0 +1,196 @@ +--- +sidebar_position: 200 +title: Getting Started +description: Get started with Defang. +--- +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# Getting Started + +## Install the Defang CLI + +Defang doesn't require installing anything in your cloud, but you will need to install the [open source](https://github.com/DefangLabs/defang) Defang command line interface (CLI) to interact with your Defang resources and account. + +We offer a few different ways to install the Defang CLI. You can use a shell script, Homebrew, Winget, or you can download the binary directly. + + + + + **Using a shell script** + + You can install the Defang CLI using a shell script. Run the following command in your terminal: + + ```bash + eval "$(curl -fsSL s.defang.io/install)" + ``` + + The script will try to download the appropriate binary for your operating system and architecture, add it to `~/.local/bin`, and add `~/.local/bin` to your `PATH` if it's not already there, with your permission. If you do not provide permission it will print an appropriate instruction for you to follow to add it manually. You can also customize the installation directory by setting the `INSTALL_DIR` environment variable before running the script. + + + **Using Homebrew** + + You can easily install the Defang CLI using [Homebrew](https://brew.sh/). Run the following command in your terminal: + + ```bash + brew install DefangLabs/defang/defang + ``` + + + **Using Winget** + + On Windows, you can install the Defang CLI using `winget`. Run the following command in your terminal: + + ```powershell + winget install defang + ``` + + + **Using Nix** + + ```bash + nix profile install github:DefangLabs/defang#defang-bin --refresh + ``` + + + **Direct Download** + + You can find the latest version of the Defang CLI on the [latest release page](https://github.com/DefangLabs/defang/releases/latest). Just download the appropriate binary for your operating system and architecture, and put it somewhere in your `PATH`. + + + +## Generate a project + +``` +$ defang generate nodejs-http +``` + +You should see the following prompt: +``` +? What folder would you like to create the project in? +``` +Type in the name of the folder you'd like to use for your new project and press ENTER. + +I'll type `"welcome-to-defang"`. Now, you'll see the following output: + +``` +? What folder would you like to create the project in? welcome-to-defang + * Fetching sample from the Defang repository... + * Writing files to disk... + - .github/ + - .github/workflows/ + - .github/workflows/deploy.yaml + - README.md + - app/ + - app/Dockerfile + - app/main.js + - compose.yaml + * Code generated successfully in folder welcome-to-defang + +Check the files in your favorite editor. +To deploy the service, do `cd welcome-to-defang` and + + defang compose up +``` + +Now, navigate to the folder you just created: + +``` +$ cd welcome-to-defang +``` + +You can open the folder in your favorite editor and see the files that were generated for you: +* The `app` folder contains the code for your service. +* The `Dockerfile` is used to build the container image for your service. +* The `compose.yaml` file is used to define the services you want to deploy. + +## Deploy to the playground + +Go back to your shell and type the following: + +``` +$ defang up +``` + +If you have not used defang before, you'll be prompted to log in. + +``` + ! Please log in to continue. +Please visit http://127.0.0.1:49154 and log in. (Right click the URL or press ENTER to open browser) +``` + +:::info +To learn more about how authentication works in defang, check out the [authenticating page](/docs/concepts/authentication). +::: + +When you do this, you should see something similar to the output below: + +``` + * Uploading build context for app + * Deploying service app + * Monitor your services' status in the defang portal + - https://portal.defang.dev/service/app + * Tailing logs for deployment ID o59k89vk3qc8 ; press Ctrl+C to detach: + * Press V to toggle verbose mode +2024-09-19T10:50:53.572443-07:00 cd Update started for stack jordanstephens-prod1 +2024-09-19T10:51:05.536299-07:00 cd Update succeeded in 11.99769745s ; provisioning... +2024-09-19T10:51:39.419693-07:00 app Server running at http://0.0.0.0:3000/ + * Service app is in state DEPLOYMENT_COMPLETED and will be available at: + - https://jordanstephens-app--3000.prod1.defang.dev + * Done. +``` + +Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the defang portal. + +![screenshot of the defang portal](/img/getting-started-portal.png) + +## Next Steps + +Congratulations! You've successfully deployed your first service with Defang. Now, where do you go from here? + +Defang supports various ways of creating and deploying services to the cloud. The following tutorials dive into each one in more detail: + + + +Choose the direction that seems the most interesting. If you have any questions, join the [Defang Discord](https://discord.gg/defang) and we'll be happy to help you out. diff --git a/docs/intro/intro.mdx b/docs/intro/intro.mdx index db3274a3e..60b628e7e 100644 --- a/docs/intro/intro.mdx +++ b/docs/intro/intro.mdx @@ -4,7 +4,7 @@ title: Overview description: Overview of Defang, a radically simpler way to develop, deploy, and debug production-ready cloud apps. --- -import IntroGrid from "../../src/components/IntroGrid" +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; #   @@ -15,5 +15,32 @@ import IntroGrid from "../../src/components/IntroGrid" 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.

Getting Started

- + diff --git a/docs/tutorials/monitoring-your-services.md b/docs/tutorials/monitoring-your-services.md new file mode 100644 index 000000000..47fb817af --- /dev/null +++ b/docs/tutorials/monitoring-your-services.md @@ -0,0 +1,25 @@ +--- +sidebar_position: 400 +title: Monitoring Your Services +description: How to monitoring services deployed with Defang +--- + +# How To Monitor Your Services With Defang + +By default, all the output (stdout and stderr) from your app is logged. You can view these logs in real-time. You can view logs for all your services, one service, or even one specific deployment of a service. + +- From the CLI: + + ```tsx + defang tail --name service1 + ``` + +- From the Defang Portal: + + [https://portal.defang.dev/](https://portal.defang.dev/) + + +:::info +* To learn more about observability in Defang, check out the [observability page](../concepts/observability.md). +* Note that the Defang Portal only displays services deployed to Defang Playground. +::: diff --git a/docs/tutorials/updating-your-services.md b/docs/tutorials/updating-your-services.md new file mode 100644 index 000000000..f86976736 --- /dev/null +++ b/docs/tutorials/updating-your-services.md @@ -0,0 +1,13 @@ +--- +sidebar_position: 500 +title: Updating Your Services +description: How to update services deployed with Defang +--- + +# How To Update Your Services With Defang + +To update your app (for example, updating the base image of your container, or making changes to your code) you can run the `defang compose up` command and it will build and deploy a new version with zero downtime. Your current version of the service will keep running and handling traffic while the new version is being built and deployed. Only after the new version passes the health checks and accepts traffic will the older version be stopped. + +:::info +If you are using [compose files](../concepts/compose.md) to define your services, you can add/remove services, make changes to code, etc. When you run `defang compose up`, the update will be diffed against the current state and any necessary changes will be applied to make the current state match the desired state. +::: diff --git a/src/components/IntroGrid.tsx b/src/components/IntroGrid.tsx index 3cd7d0db0..f1e97bb94 100644 --- a/src/components/IntroGrid.tsx +++ b/src/components/IntroGrid.tsx @@ -3,30 +3,7 @@ import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; import type {PropSidebarItem} from '@docusaurus/plugin-content-docs'; const items: PropSidebarItem[] = [ - { - type: "link", - href: "/docs/intro/what-is-defang", - label: "Learn more about Defang", - description: "What is Defang and how does it work?", - }, - { - type: "link", - href: "/docs/category/cli", - label: "CLI Reference", - description: "Use the defang CLI to deploy your app", - }, - { - type: "link", - href: "/docs/tutorials/deploy-to-playground", - label: "Try Defang", - description: "Deploy to our free playground", - }, - { - type: "link", - href: "/docs/tutorials/deploy-to-your-cloud", - label: "Deploy to your own cloud", - description: "When you're ready for production", - }, + ] export default function() { From 8080a9ab24aecde86080a5676b1df194851a869a Mon Sep 17 00:00:00 2001 From: commit111 Date: Fri, 29 Nov 2024 11:43:55 -0800 Subject: [PATCH 09/10] capitalize Defang --- docs/ask.md | 2 +- docs/concepts/portal.md | 2 +- docs/faq.md | 4 ++-- docs/getting-started.mdx | 6 +++--- docs/providers/aws/aws.md | 2 +- docs/samples.md | 2 +- docs/tutorials/deploy-to-playground.mdx | 4 ++-- docs/tutorials/use-your-own-domain-name.mdx | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/ask.md b/docs/ask.md index 021055474..04abd4849 100644 --- a/docs/ask.md +++ b/docs/ask.md @@ -1,6 +1,6 @@ --- title: "Ask Defang" -description: This is a chatbot that is trained on defang documentation and designed to answer questions +description: This is a chatbot that is trained on Defang documentation and designed to answer questions sidebar_position: 900 className: "no-title-page" --- diff --git a/docs/concepts/portal.md b/docs/concepts/portal.md index ad33aa8c0..8b9a79240 100644 --- a/docs/concepts/portal.md +++ b/docs/concepts/portal.md @@ -1,6 +1,6 @@ --- title: Portal -description: You can log into the Defang portal to view the state of your defang services. +description: You can log into the Defang portal to view the state of your Defang services. sidebar_position: 700 --- diff --git a/docs/faq.md b/docs/faq.md index 149af90a0..c1b4f67f2 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -41,7 +41,7 @@ description: Frequently asked questions about Defang. ### Will deploying a new version of my app cause downtime? -- If you have deployed your application with the `--mode=production` flag, Defang will use the _production_ deployment mode. This mode will provision your app with multiple replicas and will perform a rolling update to ensure zero downtime. If you use another deployment mode, you may experience downtime during the deployment, as defang will not provision multiple replicas to save cost. +- If you have deployed your application with the `--mode=production` flag, Defang will use the _production_ deployment mode. This mode will provision your app with multiple replicas and will perform a rolling update to ensure zero downtime. If you use another deployment mode, you may experience downtime during the deployment, as Defang will not provision multiple replicas to save cost. ### Can I deploy multiple services at once? @@ -161,7 +161,7 @@ services: - - "1234:1234" + - "1234" ``` -2. Does my healthcheck include the string `localhost`? It is very common to define a healthcheck by using `curl` or `wget` to make a request to `localhost`. So common, in fact, that defang will look for the string `localhost` in your healthcheck definition. For example, this healthcheck is valid: +2. Does my healthcheck include the string `localhost`? It is very common to define a healthcheck by using `curl` or `wget` to make a request to `localhost`. So common, in fact, that Defang will look for the string `localhost` in your healthcheck definition. For example, this healthcheck is valid: ```yaml healthcheck: diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx index 3cadf393c..c893b8616 100644 --- a/docs/getting-started.mdx +++ b/docs/getting-started.mdx @@ -114,7 +114,7 @@ Go back to your shell and type the following: $ defang up ``` -If you have not used defang before, you'll be prompted to log in. +If you have not used Defang before, you'll be prompted to log in. ``` ! Please log in to continue. @@ -142,7 +142,7 @@ When you do this, you should see something similar to the output below: * Done. ``` -Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the defang portal. +Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the Defang portal. ![screenshot of the defang portal](/img/getting-started-portal.png) @@ -164,7 +164,7 @@ Defang supports various ways of creating and deploying services to the cloud. Th type: "link", href: "/docs/tutorials/generate-new-code-using-ai", label: "Generate a Project with AI", - description: "Use defang to generate and deploy a new project", + description: "Use Defang to generate and deploy a new project", }, { type: "link", diff --git a/docs/providers/aws/aws.md b/docs/providers/aws/aws.md index 88b77e9b7..40186788a 100644 --- a/docs/providers/aws/aws.md +++ b/docs/providers/aws/aws.md @@ -92,7 +92,7 @@ Defang will create and manage the following resources in your AWS account from i | iam/Role | defang-cd-askRole-gsEeDPd6sPQY | | ec2/VPC | vpc-0cbca64f13435695 | -Then, for each project you deploy, defang will create and manage the following resources: +Then, for each project you deploy, Defang will create and manage the following resources: | Resource Type | Example Resource Name | |---------------|------------------------| diff --git a/docs/samples.md b/docs/samples.md index 322a477ba..f01da6756 100644 --- a/docs/samples.md +++ b/docs/samples.md @@ -8,7 +8,7 @@ import {Button, ButtonGroup, FormGroup, FormLabel} from "@mui/material" # Samples -Check out our sample projects here to get some inspiration and get a sense of how defang works. +Check out our sample projects here to get some inspiration and get a sense of how Defang works. import Samples from "../src/components/Samples"; diff --git a/docs/tutorials/deploy-to-playground.mdx b/docs/tutorials/deploy-to-playground.mdx index 974faf83d..917dcbea6 100644 --- a/docs/tutorials/deploy-to-playground.mdx +++ b/docs/tutorials/deploy-to-playground.mdx @@ -26,7 +26,7 @@ $ cd path/to/your/project $ defang up ``` -If you have not used defang before, you'll be prompted to log in. +If you have not used Defang before, you'll be prompted to log in. ``` ! Please log in to continue. @@ -54,6 +54,6 @@ When you do this, you should see something similar to the output below: * Done. ``` -Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the defang portal. +Now we can go to [https://portal.defang.dev/service/app](https://portal.defang.dev/service/app) to see our service listed in the Defang portal. ![screenshot of the defang portal](/img/getting-started-portal.png) diff --git a/docs/tutorials/use-your-own-domain-name.mdx b/docs/tutorials/use-your-own-domain-name.mdx index fe40b147e..c2376ddd4 100644 --- a/docs/tutorials/use-your-own-domain-name.mdx +++ b/docs/tutorials/use-your-own-domain-name.mdx @@ -15,7 +15,7 @@ In our latest version of [Defang BYOC](https://docs.defang.io/docs/concepts/defa * Make sure you [install the latest version of the Defang CLI](../getting-started#install-the-defang-cli.md) * Then, make sure you have properly [authenticated your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html). The Defang CLI makes use of AWS environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`, so make sure the correct values are set for those. -If you use the AWS CLI, you can verify that your are authenticated against AWS using the following command (note that the AWS CLI itself is not required to use the defang cli in BYOC mode): +If you use the AWS CLI, you can verify that your are authenticated against AWS using the following command (note that the AWS CLI itself is not required to use the Defang CLI in BYOC mode): ```bash aws sts get-caller-identity ``` From 1828c42e9f9a0f12f3a1fe04562c55ee2ad448de Mon Sep 17 00:00:00 2001 From: commit111 Date: Fri, 29 Nov 2024 12:50:23 -0800 Subject: [PATCH 10/10] minor wording fixes --- docs/cli/_category_.json | 2 +- docs/concepts/defang-byoc.md | 3 ++- docs/getting-started.mdx | 2 +- docs/providers/azure.md | 6 ++++-- docs/providers/digitalocean/digitalocean.md | 2 +- docs/providers/gcp.md | 6 ++++-- docs/tutorials/deploy-to-gcp.mdx | 2 +- 7 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/cli/_category_.json b/docs/cli/_category_.json index 1495e62af..b4791a9cc 100644 --- a/docs/cli/_category_.json +++ b/docs/cli/_category_.json @@ -3,7 +3,7 @@ "position": 500, "link": { "type": "generated-index", - "description": "Documentation of all the CLI commands" + "description": "Documentation of the Defang CLI (command line interface) commands." } } diff --git a/docs/concepts/defang-byoc.md b/docs/concepts/defang-byoc.md index d309d52d7..74e896074 100644 --- a/docs/concepts/defang-byoc.md +++ b/docs/concepts/defang-byoc.md @@ -47,8 +47,9 @@ Please read the [DigitalOcean Provider](../providers/digitalocean/digitalocean.m ## GCP :::info -We will be working on GCP support in the future. If you are interested in GCP support, please vote on [this issue](https://github.com/DefangLabs/defang/issues/58). +Google Cloud Platform (GCP) support is coming soon to Defang. Stay tuned for updates! ::: +Please check out the [GCP Provider](../providers/gcp/) page for more details. ## Azure diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx index c893b8616..e908c957d 100644 --- a/docs/getting-started.mdx +++ b/docs/getting-started.mdx @@ -122,7 +122,7 @@ Please visit http://127.0.0.1:49154 and log in. (Right click the URL or press EN ``` :::info -To learn more about how authentication works in defang, check out the [authenticating page](/docs/concepts/authentication). +To learn more about how authentication works in Defang, check out the [Authenticating With Defang](/docs/concepts/authentication) page. ::: When you do this, you should see something similar to the output below: diff --git a/docs/providers/azure.md b/docs/providers/azure.md index f1142cc4f..8eaddd948 100644 --- a/docs/providers/azure.md +++ b/docs/providers/azure.md @@ -7,5 +7,7 @@ sidebar_position: 4000 # Azure :::info -We will be working on Azure support in the future. If you are interested in Azure support, please vote on [this issue](https://github.com/DefangLabs/defang/issues/57). -::: \ No newline at end of file +We will be working on Microsoft Azure support in the future. If you are interested in Azure support, please vote on [this issue](https://github.com/DefangLabs/defang/issues/57). +::: + +You can learn more about other cloud [providers](/docs/category/providers/). \ No newline at end of file diff --git a/docs/providers/digitalocean/digitalocean.md b/docs/providers/digitalocean/digitalocean.md index 008c11cb4..a7798ed3f 100644 --- a/docs/providers/digitalocean/digitalocean.md +++ b/docs/providers/digitalocean/digitalocean.md @@ -74,4 +74,4 @@ The following features are still in development for DigitalOcean: - [Managed Redis](/docs/concepts//managed-storage/managed-redis.md) - [Managed Postgres](/docs/concepts/managed-storage/managed-postgres.md) -Stayed tuned for future updates! +Stay tuned for future updates! diff --git a/docs/providers/gcp.md b/docs/providers/gcp.md index 948a893aa..2a9de67ac 100644 --- a/docs/providers/gcp.md +++ b/docs/providers/gcp.md @@ -7,5 +7,7 @@ sidebar_position: 3000 # GCP :::info -GCP support is coming soon to Defang! -::: \ No newline at end of file +Google Cloud Platform (GCP) support is coming soon to Defang. Stay tuned for updates! +::: + +This page will be updated soon. In the meantime, you can learn more about other cloud [providers](/docs/category/providers/). \ No newline at end of file diff --git a/docs/tutorials/deploy-to-gcp.mdx b/docs/tutorials/deploy-to-gcp.mdx index be6365d92..f57c4159a 100644 --- a/docs/tutorials/deploy-to-gcp.mdx +++ b/docs/tutorials/deploy-to-gcp.mdx @@ -6,7 +6,7 @@ sidebar_position: 11 # Deploying to Google Cloud Platform (GCP) With Defang -Coming soon! +This tutorial is coming soon. ---