From a7b81c184dae2cd734d6c705216cc6c0eeb6cf77 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Thu, 23 Oct 2025 11:31:04 -0700 Subject: [PATCH 1/3] setup nix flake --- .gitignore | 2 ++ flake.lock | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 26 ++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index b0408bb9b2..f6ae1fe51d 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,5 @@ defang samples /docs/samples.md /static/samples-v2.json +.envrc +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000000..5113033375 --- /dev/null +++ b/flake.lock @@ -0,0 +1,58 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1760965567, + "narHash": "sha256-0JDOal5P7xzzAibvD0yTE3ptyvoVOAL0rcELmDdtSKg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cb82756ecc37fa623f8cf3e88854f9bf7f64af93", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000000..a5695909e2 --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + outputs = + { + self, + nixpkgs, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { + inherit system; + }; + in + { + devShell = + with pkgs; + mkShell { + buildInputs = [ + go_1_24 # must match GO_VERSION in Dockerfile + nodejs_24 # for Pulumi, must match values in package.json + ]; + }; + } + ); +} From f73243e4aead1a0a2af23f181e205bf36ffc6b75 Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Thu, 23 Oct 2025 12:26:49 -0700 Subject: [PATCH 2/3] reorganizing docs to avoid deeply nested sidebar This commit moves primary sections into the top nav and uses unique sidebars for each section. This commit also adds a non-generated index page to each section where we can highlight specific pages that are likely to be most interesting. A few page urls were changed, redirects have been added. --- ...024-02-12-announcing-defang-public-beta.md | 4 +- blog/2024-03-28-slackbot-sample.md | 2 +- blog/2025-02-18-model-context-protocol.md | 2 +- ...2025-04-10-easiest-way-to-deploy-django.md | 2 +- docs/cli/_category_.json | 3 +- docs/concepts/_category_.json | 2 +- docs/concepts/authentication.md | 2 +- docs/concepts/configuration.md | 6 +- docs/concepts/debug.md | 2 +- docs/concepts/defang-byoc.md | 6 +- docs/concepts/generate.md | 2 +- docs/concepts/index.mdx | 40 +++++++++++++ docs/concepts/mcp.md | 6 +- docs/intro/_category_.json | 5 -- docs/{ => intro}/faq/_category_.json | 0 docs/{ => intro}/faq/questions.md | 8 +-- docs/{ => intro}/faq/warnings-errors.md | 0 docs/intro/features.mdx | 4 +- docs/{ => intro}/getting-started.mdx | 2 +- docs/intro/how-it-works.mdx | 2 +- docs/intro/intro.mdx | 2 +- docs/{ => intro}/use-cases/_category_.json | 0 docs/intro/what-is-defang.mdx | 2 +- docs/providers/_category_.json | 4 +- docs/providers/{aws => }/aws.md | 59 +++++++++++++++++- docs/providers/aws/_category_.json | 5 -- docs/providers/aws/create-user.md | 60 ------------------- docs/providers/azure.md | 4 +- .../{digitalocean => }/digitalocean.md | 4 +- docs/providers/digitalocean/_category_.json | 5 -- docs/providers/gcp.md | 2 +- docs/providers/index.mdx | 40 +++++++++++++ docs/providers/playground.md | 6 +- docs/tutorials/_category_.json | 2 +- .../configure-environment-variables.md | 2 +- .../deploy-container-using-the-cli.mdx | 2 +- docs/tutorials/deploy-to-aws.mdx | 2 +- docs/tutorials/deploy-to-digitalocean.mdx | 2 +- docs/tutorials/deploy-to-gcp.mdx | 2 +- docs/tutorials/deploy-to-playground.mdx | 2 +- docs/tutorials/deploy-using-pulumi.mdx | 2 +- docs/tutorials/deploy-with-gpu.mdx | 4 +- docs/tutorials/generate-new-code-using-ai.mdx | 2 +- docs/tutorials/index.mdx | 40 +++++++++++++ docs/tutorials/migrating-from-heroku.md | 2 +- docs/tutorials/monitoring-your-services.md | 2 +- docs/tutorials/use-your-own-domain-name.mdx | 2 +- docs/tutorials/using-one-click-deploy.md | 4 +- docusaurus.config.js | 16 +++-- redirects.json | 20 +++++++ sidebars.js | 18 ++++-- static/samples.json | 12 ++-- 52 files changed, 282 insertions(+), 149 deletions(-) create mode 100644 docs/concepts/index.mdx delete mode 100644 docs/intro/_category_.json rename docs/{ => intro}/faq/_category_.json (100%) rename docs/{ => intro}/faq/questions.md (84%) rename docs/{ => intro}/faq/warnings-errors.md (100%) rename docs/{ => intro}/getting-started.mdx (99%) rename docs/{ => intro}/use-cases/_category_.json (100%) rename docs/providers/{aws => }/aws.md (77%) delete mode 100644 docs/providers/aws/_category_.json delete mode 100644 docs/providers/aws/create-user.md rename docs/providers/{digitalocean => }/digitalocean.md (97%) delete mode 100644 docs/providers/digitalocean/_category_.json create mode 100644 docs/providers/index.mdx create mode 100644 docs/tutorials/index.mdx diff --git a/blog/2024-02-12-announcing-defang-public-beta.md b/blog/2024-02-12-announcing-defang-public-beta.md index da8d4ece6d..aa32230c52 100644 --- a/blog/2024-02-12-announcing-defang-public-beta.md +++ b/blog/2024-02-12-announcing-defang-public-beta.md @@ -11,13 +11,13 @@ Ever since we shipped our Private Beta in the summer of 2023, we have been worki And so, today with our Public Beta, we are addressing this request. With today’s release of [Defang BYOC](/docs/concepts/defang-byoc) (Bring-your-own-Cloud), you can now enjoy all the benefits of Defang **and** deploy applications to your own AWS account! Our Private Beta experience is still available as [Defang Playground](/docs/concepts/defang-playground) for you to quickly and easily prototype applications and deploy them to our hosted environment. -You can learn more about Defang [here](/docs/intro). Also check out our [tutorials](/docs/category/tutorials), [samples](https://defang.io/samples), and [FAQ](/docs/category/faq) to know more. +You can learn more about Defang [here](/docs/intro). Also check out our [tutorials](/docs/tutorials), [samples](https://defang.io/samples), and [FAQ](/docs/category/faq) to know more. {/* truncate */} **Try the Public Beta!** -To try the Public Beta, please go to [defang.io](http://defang.io) and click on [Download](https://github.com/DefangLabs/defang/releases/latest) to download the CLI and [get started](/docs/getting-started). We would love to have you kick the tires and give us your feedback! Once you sign up you’ll receive an invitation to our Slack support channel in email. You are also welcome to file [GitHub issues here](https://github.com/DefangLabs/defang/issues). +To try the Public Beta, please go to [defang.io](http://defang.io) and click on [Download](https://github.com/DefangLabs/defang/releases/latest) to download the CLI and [get started](/docs/intro/getting-started). We would love to have you kick the tires and give us your feedback! Once you sign up you’ll receive an invitation to our Slack support channel in email. You are also welcome to file [GitHub issues here](https://github.com/DefangLabs/defang/issues). **Stay Tuned for More** diff --git a/blog/2024-03-28-slackbot-sample.md b/blog/2024-03-28-slackbot-sample.md index f14c9b7535..4ec72ed769 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](/docs/getting-started#install-the-defang-cli) 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](/docs/intro/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/blog/2025-02-18-model-context-protocol.md b/blog/2025-02-18-model-context-protocol.md index e5976ce81c..2def05fda7 100644 --- a/blog/2025-02-18-model-context-protocol.md +++ b/blog/2025-02-18-model-context-protocol.md @@ -132,7 +132,7 @@ Here we can see what changes if we deploy to the cloud: 1. Service 1 and Service 2 are now deployed to the cloud, not on the local machine anymore. 2. The only part on the local machine is the browser. -Using the same `compose.yaml` file as shown earlier, we can deploy the containers to the cloud with the [Defang CLI](/docs/getting-started). Once we’ve authenticated and logged in, we can [choose a cloud provider (i.e. AWS, GCP, or DigitalOcean)](/docs/tutorials/deploy-to-your-cloud) and use our own cloud account for deployment. Then, we can set a configuration variable for the Anthropic API key: +Using the same `compose.yaml` file as shown earlier, we can deploy the containers to the cloud with the [Defang CLI](/docs/intro/getting-started). Once we’ve authenticated and logged in, we can [choose a cloud provider (i.e. AWS, GCP, or DigitalOcean)](/docs/tutorials/deploy-to-your-cloud) and use our own cloud account for deployment. Then, we can set a configuration variable for the Anthropic API key: ```bash defang config set ANTHROPIC_API= diff --git a/blog/2025-04-10-easiest-way-to-deploy-django.md b/blog/2025-04-10-easiest-way-to-deploy-django.md index 546e6f8507..6f9183253d 100644 --- a/blog/2025-04-10-easiest-way-to-deploy-django.md +++ b/blog/2025-04-10-easiest-way-to-deploy-django.md @@ -93,7 +93,7 @@ Once deployed, your app is accessible via a public URL provided by Defang, which ### Deploying to Your Own Cloud -To deploy directly into your AWS account (or other [supported providers](/docs/category/providers)): +To deploy directly into your AWS account (or other [supported providers](/docs/providers)): 1. Set your cloud provider: > In my case, I use an AWS Profile, but you should be able to use [any methods supported by the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) diff --git a/docs/cli/_category_.json b/docs/cli/_category_.json index b4791a9cc6..8cc2695c44 100644 --- a/docs/cli/_category_.json +++ b/docs/cli/_category_.json @@ -1,9 +1,8 @@ { "label": "CLI", - "position": 500, "link": { + "slug": "cli", "type": "generated-index", "description": "Documentation of the Defang CLI (command line interface) commands." } } - diff --git a/docs/concepts/_category_.json b/docs/concepts/_category_.json index 9ea83ff34b..139f7f3e77 100644 --- a/docs/concepts/_category_.json +++ b/docs/concepts/_category_.json @@ -1,7 +1,7 @@ { "label": "Concepts", - "position": 500, "link": { + "slug": "concepts", "type": "generated-index", "description": "Some concepts to help explain how the Defang system is organized and tooling that will help you manage your applications." } diff --git a/docs/concepts/authentication.md b/docs/concepts/authentication.md index 652f00831e..24da8887c2 100644 --- a/docs/concepts/authentication.md +++ b/docs/concepts/authentication.md @@ -5,7 +5,7 @@ description: Authenticating with Defang. # Authentication -To do pretty much anything with Defang, you'll need to authenticate with the system. You can do this by running the following command in the [CLI](/docs/getting-started): +To do pretty much anything with Defang, you'll need to authenticate with the system. You can do this by running the following command in the [CLI](/docs/intro/getting-started): ```bash defang login diff --git a/docs/concepts/configuration.md b/docs/concepts/configuration.md index cb89f9fb66..c89d2fe516 100644 --- a/docs/concepts/configuration.md +++ b/docs/concepts/configuration.md @@ -95,9 +95,9 @@ If you have created a service before a secret you can connect it by running the Here are the different ways sensitive config values are stored depending on the provider you are using: - * [AWS](../providers/aws/aws.md#secrets) - * [DigitalOcean](../providers/digitalocean#secrets) - * [GCP](../providers/gcp#secrets) + * [AWS](/docs/providers/aws#secrets) + * [DigitalOcean](/docs/providers/digitalocean#secrets) + * [GCP](/docs/providers/gcp#secrets) :::info Please note that while Defang supports setting sensitive config, it does not support the [`secrets`](https://docs.docker.com/reference/compose-file/secrets/) top-level element as seen in the Compose specification. Please see our [Compose](/docs/concepts/compose) page for more details. diff --git a/docs/concepts/debug.md b/docs/concepts/debug.md index 01692dc0a2..aa8ba33bcd 100644 --- a/docs/concepts/debug.md +++ b/docs/concepts/debug.md @@ -13,7 +13,7 @@ Defang has another AI-driven tool called [`generate`](/docs/concepts/generate). ## How It Works -Here is a typical workflow in the [Defang CLI](/docs/getting-started) that will automatically run the AI debugger tool: +Here is a typical workflow in the [Defang CLI](/docs/intro/getting-started) that will automatically run the AI debugger tool: 1. When you deploy a project with Defang (i.e. `defang compose up`), the CLI will wait for all services' statuses to switch to healthy. diff --git a/docs/concepts/defang-byoc.md b/docs/concepts/defang-byoc.md index 798ff7293e..e1043bedcc 100644 --- a/docs/concepts/defang-byoc.md +++ b/docs/concepts/defang-byoc.md @@ -28,7 +28,7 @@ $ export DEFANG_PROVIDER=digitalocean ## AWS -Please read the [AWS Provider](../providers/aws/aws.md) documentation for more details about how the AWS provider works and how to get started. +Please read the [AWS Provider](/docs/providers/aws) documentation for more details about how the AWS provider works and how to get started. :::tip[AWS Free Tier & Credits] You can use the AWS Free Tier to try out Defang. Learn more about it [here](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all). If you're an eligible startup, you can sign up for credits [here](https://aws.amazon.com/startups/sign-up?referrer_url_path=%2Fstartups). @@ -41,7 +41,7 @@ You can use the AWS Free Tier to try out Defang. Learn more about it [here](http The Defang DigitalOcean Provider is available for Public Preview as of October 2024. ::: -Please read the [DigitalOcean Provider](../providers/digitalocean/digitalocean.md) documentation for more details about how the DigitalOcean provider works and how to get started. +Please read the [DigitalOcean Provider](/docs/providers/digitalocean) documentation for more details about how the DigitalOcean provider works and how to get started. :::tip[DigitalOcean Credits] You can get DigitalOcean credits to try out Defang. Learn more about it on their [pricing page](https://www.digitalocean.com/pricing). If you're an eligible startup, you can sign up for credits [here](https://www.digitalocean.com/hatch). @@ -53,7 +53,7 @@ You can get DigitalOcean credits to try out Defang. Learn more about it on their The Defang GCP Provider is available for Public Preview as of December 2024. ::: -Please check out the [GCP Provider](../providers/gcp/) page for more details. +Please check out the [GCP Provider](/docs/providers/gcp/) page for more details. :::tip[GCP Free Tier & Credits] You can use the GCP Free Tier to try out Defang. Learn more about it [here](https://cloud.google.com/free). If you're an eligible startup, you can sign up for credits [here](https://cloud.google.com/developers/startups). diff --git a/docs/concepts/generate.md b/docs/concepts/generate.md index 54fe4f9d5f..45853c7840 100644 --- a/docs/concepts/generate.md +++ b/docs/concepts/generate.md @@ -5,7 +5,7 @@ description: Defang uses AI to help you generate a starting point for your cloud # 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](/docs/getting-started#install-the-defang-cli). +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](/docs/intro/getting-started#install-the-defang-cli). We are working on expanding the range of supported prompts and improving the accuracy of the AI agent. If you have any feedback or suggestions, please let us know by [opening an issue](https://github.com/DefangLabs/defang/issues/new). diff --git a/docs/concepts/index.mdx b/docs/concepts/index.mdx new file mode 100644 index 0000000000..7c4ef0efde --- /dev/null +++ b/docs/concepts/index.mdx @@ -0,0 +1,40 @@ +--- +sidebar_position: 1 +title: Defang Concepts +description: Learn about Defang concepts +--- + +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; + +# Featured Concepts: + + + +For a complete list of concepts, check out the sidebar. diff --git a/docs/concepts/mcp.md b/docs/concepts/mcp.md index 198b6dc80c..664621b684 100644 --- a/docs/concepts/mcp.md +++ b/docs/concepts/mcp.md @@ -20,12 +20,12 @@ This page is a guide to the Defang MCP Server detailing its installation, tools, ## Installation -Ensure that you have the [Defang CLI](/docs/getting-started.mdx#install-the-defang-cli) installed. +Ensure that you have the [Defang CLI](/docs/intro/getting-started.mdx#install-the-defang-cli) installed. Run the setup command in your terminal for your IDE of choice from the [Supported IDEs](#supported-ides) section. This will connect the Defang MCP Server to your IDE. The general format of the command is as follows: :::tip[Recommended Installation] -Install the [Defang CLI](/docs/getting-started.mdx#install-the-defang-cli) using [Curl](https://curl.se/) or [Homebrew](https://brew.sh/) +Install the [Defang CLI](/docs/intro/getting-started.mdx#install-the-defang-cli) using [Curl](https://curl.se/) or [Homebrew](https://brew.sh/) ```bash defang mcp setup --client= @@ -279,7 +279,7 @@ Feel free to try any of these prompts or create your own! ## Manual Setup -If you prefer to set up the Defang MCP Server manually without using the setup command and without installing the [Defang CLI](/docs/getting-started.mdx#install-the-defang-cli), you can copy this MCP configuration into your IDE's MCP file: +If you prefer to set up the Defang MCP Server manually without using the setup command and without installing the [Defang CLI](/docs/intro/getting-started.mdx#install-the-defang-cli), you can copy this MCP configuration into your IDE's MCP file: ```json { diff --git a/docs/intro/_category_.json b/docs/intro/_category_.json deleted file mode 100644 index ba93f2c796..0000000000 --- a/docs/intro/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "label": "Overview", - "position": 1, - "collapsible": true -} diff --git a/docs/faq/_category_.json b/docs/intro/faq/_category_.json similarity index 100% rename from docs/faq/_category_.json rename to docs/intro/faq/_category_.json diff --git a/docs/faq/questions.md b/docs/intro/faq/questions.md similarity index 84% rename from docs/faq/questions.md rename to docs/intro/faq/questions.md index 0d88d5785a..0eeb87942f 100644 --- a/docs/faq/questions.md +++ b/docs/intro/faq/questions.md @@ -11,7 +11,7 @@ import {Button, ButtonGroup, FormGroup, FormLabel} from "@mui/material" ### Which cloud/region is the app being deployed to? -- In the [Defang Playground](/docs/concepts/defang-playground), the app is deployed to AWS `us-west-2`. In the [Defang BYOC](/docs/concepts/defang-byoc) model, the region is determined by your Defang BYOC [Provider](/docs/category/providers) settings. +- In the [Defang Playground](/docs/concepts/defang-playground), the app is deployed to AWS `us-west-2`. In the [Defang BYOC](/docs/concepts/defang-byoc) model, the region is determined by your Defang BYOC [Provider](/docs/providers) settings. ### Can I bring my own AWS or other cloud account? @@ -66,13 +66,13 @@ import {Button, ButtonGroup, FormGroup, FormLabel} from "@mui/material" ## Feature Comparisons ### Is Defang a run-time platform? -- No. Defang is not a run-time platform. Instead, it lets you host and run your application on a [cloud provider](/docs/category/providers) of your choice. You can think of it as a tool that makes it way easier to deploy to that cloud provider. We do provide [Defang Playground](/docs/concepts/defang-playground), but it is meant to be used as a testing environment only. +- No. Defang is not a run-time platform. Instead, it lets you host and run your application on a [cloud provider](/docs/providers) of your choice. You can think of it as a tool that makes it way easier to deploy to that cloud provider. We do provide [Defang Playground](/docs/concepts/defang-playground), but it is meant to be used as a testing environment only. ### What is the difference between Defang and platforms such as Vercel, fly.io, Railway, Render, or Heroku? -- Defang is a tool that helps you get your application deployed to a [cloud provider](/docs/category/providers) of your choice, and it is not a platform. Unlike platforms, Defang does not host your application. We do provide [Defang Playground](/docs/concepts/defang-playground), but it is meant to be used as a testing environment only. +- Defang is a tool that helps you get your application deployed to a [cloud provider](/docs/providers) of your choice, and it is not a platform. Unlike platforms, Defang does not host your application. We do provide [Defang Playground](/docs/concepts/defang-playground), but it is meant to be used as a testing environment only. ### What is the difference between Defang and tools such as SST? -- Defang is cloud-agnostic and language-agnostic, meaning that it is designed to work with different [cloud providers](/docs/category/providers), and programming languages. Since Defang is not tied to just one cloud or language, this allows for greater flexibility in a wide range of cases. Another difference is that Defang follows the [Compose specification](https://docs.docker.com/compose/compose-file/), allowing it to work smoothly with various container platforms such as Docker. +- Defang is cloud-agnostic and language-agnostic, meaning that it is designed to work with different [cloud providers](/docs/providers), and programming languages. Since Defang is not tied to just one cloud or language, this allows for greater flexibility in a wide range of cases. Another difference is that Defang follows the [Compose specification](https://docs.docker.com/compose/compose-file/), allowing it to work smoothly with various container platforms such as Docker. ## Troubleshooting diff --git a/docs/faq/warnings-errors.md b/docs/intro/faq/warnings-errors.md similarity index 100% rename from docs/faq/warnings-errors.md rename to docs/intro/faq/warnings-errors.md diff --git a/docs/intro/features.mdx b/docs/intro/features.mdx index f6e786ba39..9ec7e34535 100644 --- a/docs/intro/features.mdx +++ b/docs/intro/features.mdx @@ -22,10 +22,10 @@ Defang provides a streamlined experience to develop, deploy, and debug your clou - Ability to express your project configuration using a [Docker Compose YAML](/docs/concepts/compose) file ### Effortless Deployment -- [One-command deployments](/docs/getting-started#install-the-defang-cli) +- [One-command deployments](/docs/intro/getting-started#install-the-defang-cli) - Support for [GPUs](/docs/concepts/resources) and [managed storage options](/docs/concepts/managed-storage) - Support for Infra-as-Code via the [Defang Pulumi provider](/docs/concepts/pulumi) ### Security and Configuration - 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) \ No newline at end of file +- Pre-configured environments with built-in [security](/docs/concepts/security), [networking](/docs/concepts/networking), and [observability](/docs/concepts/observability) diff --git a/docs/getting-started.mdx b/docs/intro/getting-started.mdx similarity index 99% rename from docs/getting-started.mdx rename to docs/intro/getting-started.mdx index f1ef4bdb40..f0d85b1e99 100644 --- a/docs/getting-started.mdx +++ b/docs/intro/getting-started.mdx @@ -168,7 +168,7 @@ Defang supports various ways of creating and deploying services to the cloud. Th }, { type: "link", - href: "/docs/category/cli", + href: "/docs/cli", label: "Explore the Defang CLI", description: "Learn more about the Defang CLI", }, diff --git a/docs/intro/how-it-works.mdx b/docs/intro/how-it-works.mdx index 4bad8bea2d..5bd3a0f167 100644 --- a/docs/intro/how-it-works.mdx +++ b/docs/intro/how-it-works.mdx @@ -14,7 +14,7 @@ The first time you deploy with Defang, a new `CD` service will be created in you Our architecture and AWS implementation has passed a ["well-architected"](https://docs.aws.amazon.com/wellarchitected/latest/framework/welcome.html) review. We are in the process for obtaining similar qualifications with Digital Ocean and Google Cloud. -You can learn more about the specifics by visiting our [provider docs](/docs/category/providers). +You can learn more about the specifics by visiting our [provider docs](/docs/providers). :::info The `CD` service does not run all the time. It is only used when you deploy a new service or update an existing service. Once it has finished deploying your service, it will shut itself down. diff --git a/docs/intro/intro.mdx b/docs/intro/intro.mdx index 8d29106004..a25af42aad 100644 --- a/docs/intro/intro.mdx +++ b/docs/intro/intro.mdx @@ -26,7 +26,7 @@ import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; }, { type: "link", - href: "/docs/category/cli", + href: "/docs/cli", label: "CLI Reference", description: "Use the Defang CLI to deploy your app", }, diff --git a/docs/use-cases/_category_.json b/docs/intro/use-cases/_category_.json similarity index 100% rename from docs/use-cases/_category_.json rename to docs/intro/use-cases/_category_.json diff --git a/docs/intro/what-is-defang.mdx b/docs/intro/what-is-defang.mdx index 64bf594883..ec0be9ad85 100644 --- a/docs/intro/what-is-defang.mdx +++ b/docs/intro/what-is-defang.mdx @@ -15,7 +15,7 @@ Defang lets you take your app from Docker Compose to a secure and scalable deplo Any App, Any Stack, Any Cloud. ### Get Started Quickly -The [Defang CLI (command line interface)](/docs/getting-started#install-the-defang-cli) includes an AI 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. Or choose from our [library of over 50 samples](https://defang.io/samples/) covering all major frameworks and technologies. +The [Defang CLI (command line interface)](/docs/intro/getting-started#install-the-defang-cli) includes an AI 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. Or choose from our [library of over 50 samples](https://defang.io/samples/) covering all major frameworks and technologies. ### Deploy with a Single Command diff --git a/docs/providers/_category_.json b/docs/providers/_category_.json index a11c665048..4600365c2c 100644 --- a/docs/providers/_category_.json +++ b/docs/providers/_category_.json @@ -1,8 +1,8 @@ { "label": "Providers", - "position": 400, "link": { + "slug": "providers", "type": "generated-index", - "description": "Defang allows you to use your own cloud accounts to deploy your applications. Click on a link below to read documentation about specific providers. If no provider is specified, the Defang CLI will prompt you to select a provider interactively. The selected provider will be stored in the working directory of the project’s compose file and will be applied to all subsequent commands by default. You can also specify a preferred provider in the compose file by using `x-defang-provider` extension at the root level of the compose file." + "description": "Explore the various deployment providers supported by Defang." } } diff --git a/docs/providers/aws/aws.md b/docs/providers/aws.md similarity index 77% rename from docs/providers/aws/aws.md rename to docs/providers/aws.md index 354fa3af67..14efc1d462 100644 --- a/docs/providers/aws/aws.md +++ b/docs/providers/aws.md @@ -1,7 +1,7 @@ --- title: AWS description: Defang allows you to easily create and manage full, scalable applications with AWS. -sidebar_position: 000 +sidebar_position: 2 --- # Amazon Web Services (AWS) @@ -17,7 +17,7 @@ You can use the AWS Free Tier to try out Defang. Learn more about it [here](http Getting started with the Defang BYOC AWS Provider is easy. The first step is to [authenticate your shell](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) with AWS as an admin user. The authenticated user should be an IAM admin because Defang will need permission to create resources and IAM roles in your account. :::info -You can create other [AWS users](./create-user.md) for deployment. +You can create other [AWS users](/docs/providers/aws#creating-an-aws-iam-user-for-defang) for deployment. ::: :::tip @@ -138,3 +138,58 @@ Then, for each project you deploy, Defang will create and manage the following r | ec2/SecurityGroup | bootstrap | | ec2/VpcDhcpOptions | dhcp-options | | cloudwatch/LogGroup | logs | + +## Creating an AWS IAM User for Defang + +To deploy applications with Defang on AWS, you need an IAM user with appropriate permissions and access keys. This guide walks you through the process step by step. + +### Step 1: Create an IAM User + +#### a. Open the IAM Service +Go to the [IAM Users Panel](https://console.aws.amazon.com/iam/home#/users). + +#### b. Click Create User +Click the **Create user** button at the top right. + +Create user button + +#### c. User details +Enter a user name, and assign permissions. Defang requires the `PowerUserAccess` policy in order to deploy and manage resources in your account. + +User name input + +Assign policies to user + +#### d. Review and Confirm +Review your settings and confirm the creation of the user. + +--- + +### Step 2: Create Access Keys + +Access keys are the easiest way to authorize programmatic access to AWS. Follow these steps to create them: + +#### a. Select the New User +After creating the user, locate them in the [IAM Users Panel](https://console.aws.amazon.com/iam/home#/users) and select the user. + +New user in panel + +#### b. Create Access Key +In the **User Summary** panel, click **Create access key**. + +Key creation panel + +#### c. Select Use Case +For Defang, select the use case "Application running on AWS compute service". + +Use case + +#### d. Add Description and Continue +Optionally, provide a description for the key and click **Next**. + +Key description + +#### e. Save Your Access Keys +Your new access key will be generated. **Copy and save the Access Key ID and Secret Access Key**—you will need these for Defang deployments. + +Access keys diff --git a/docs/providers/aws/_category_.json b/docs/providers/aws/_category_.json deleted file mode 100644 index 1df8847e1f..0000000000 --- a/docs/providers/aws/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "label": "AWS", - "position": 1000, - "collapsible": true -} \ No newline at end of file diff --git a/docs/providers/aws/create-user.md b/docs/providers/aws/create-user.md deleted file mode 100644 index 02329ffecf..0000000000 --- a/docs/providers/aws/create-user.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: Creating an AWS IAM User -description: Step-by-step instructions for creating an IAM user and access keys for Defang deployments. -sidebar_position: 100 ---- - -## Creating an AWS IAM User for Defang - -To deploy applications with Defang on AWS, you need an IAM user with appropriate permissions and access keys. This guide walks you through the process step by step. - -## Step 1: Create an IAM User - -### a. Open the IAM Service -Go to the [IAM Users Panel](https://console.aws.amazon.com/iam/home#/users). - -### b. Click Create User -Click the **Create user** button at the top right. - -Create user button - -### c. User details -Enter a user name, and assign permissions. Defang requires the `PowerUserAccess` policy in order to deploy and manage resources in your account. - -User name input - -Assign policies to user - -### d. Review and Confirm -Review your settings and confirm the creation of the user. - ---- - -## Step 2: Create Access Keys - -Access keys are the easiest way to authorize programmatic access to AWS. Follow these steps to create them: - -### a. Select the New User -After creating the user, locate them in the [IAM Users Panel](https://console.aws.amazon.com/iam/home#/users) and select the user. - -New user in panel - -### b. Create Access Key -In the **User Summary** panel, click **Create access key**. - -Key creation panel - -### c. Select Use Case -For Defang, select the use case "Application running on AWS compute service". - -Use case - -### d. Add Description and Continue -Optionally, provide a description for the key and click **Next**. - -Key description - -### e. Save Your Access Keys -Your new access key will be generated. **Copy and save the Access Key ID and Secret Access Key**—you will need these for Defang deployments. - -Access keys diff --git a/docs/providers/azure.md b/docs/providers/azure.md index de7d49c004..12779ab625 100644 --- a/docs/providers/azure.md +++ b/docs/providers/azure.md @@ -1,7 +1,7 @@ --- title: Azure description: Defang will allow you to easily create and manage full, scalable applications with Azure. -sidebar_position: 4000 +sidebar_position: 4 --- # Azure @@ -10,4 +10,4 @@ sidebar_position: 4000 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). ::: -You can learn more about other cloud [providers](/docs/category/providers/). \ No newline at end of file +You can learn more about other cloud [providers](/docs/providers/). diff --git a/docs/providers/digitalocean/digitalocean.md b/docs/providers/digitalocean.md similarity index 97% rename from docs/providers/digitalocean/digitalocean.md rename to docs/providers/digitalocean.md index 9991c99cfe..7af17a957d 100644 --- a/docs/providers/digitalocean/digitalocean.md +++ b/docs/providers/digitalocean.md @@ -1,7 +1,7 @@ --- title: DigitalOcean description: Defang allows you to easily create and manage full, scalable applications with DigitalOcean. -sidebar_position: 010 +sidebar_position: 5 --- # DigitalOcean @@ -20,7 +20,7 @@ Why should you use Defang with DigitalOcean? Defang allows you to easily create ### Install Defang -To get started with the Defang BYOC DigitalOcean Provider, first [install the latest version of the Defang CLI](/docs/getting-started). +To get started with the Defang BYOC DigitalOcean Provider, first [install the latest version of the Defang CLI](/docs/intro/getting-started). ### Sign up for DigitalOcean diff --git a/docs/providers/digitalocean/_category_.json b/docs/providers/digitalocean/_category_.json deleted file mode 100644 index 559e213f23..0000000000 --- a/docs/providers/digitalocean/_category_.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "label": "DigitalOcean", - "position": 2000, - "collapsible": true -} \ No newline at end of file diff --git a/docs/providers/gcp.md b/docs/providers/gcp.md index dc6a56599d..350b14a84d 100644 --- a/docs/providers/gcp.md +++ b/docs/providers/gcp.md @@ -1,7 +1,7 @@ --- title: GCP description: Defang will allow you to easily create and manage full, scalable applications with GCP. -sidebar_position: 3000 +sidebar_position: 3 --- # Google Cloud Platform (GCP) diff --git a/docs/providers/index.mdx b/docs/providers/index.mdx new file mode 100644 index 0000000000..a44be84337 --- /dev/null +++ b/docs/providers/index.mdx @@ -0,0 +1,40 @@ +--- +sidebar_position: 1 +title: Defang Providers +description: Defang supports all the major cloud providers +--- + +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; + +## Supported Providers + +Defang makes it easy to deploy your application to your favourite cloud provider. + + diff --git a/docs/providers/playground.md b/docs/providers/playground.md index 5f6e3d60a3..ae70a9e1dc 100644 --- a/docs/providers/playground.md +++ b/docs/providers/playground.md @@ -1,10 +1,10 @@ --- title: Playground description: The Defang Playground is a free tier that allows you to experiment with Defang. -sidebar_position: 0000 +sidebar_position: 10 --- -The Defang Playground is a free deployment provider that allows you to experiment with Defang. The Playground is a shared environment that should not be used to run production workloads. The Playground is a great way to get started with Defang. You can even use [1-Click Deploy](/docs/tutorials/using-one-click-deploy) to try it out quickly or you can get started with the [Defang CLI](/docs/getting-started). +The Defang Playground is a free deployment provider that allows you to experiment with Defang. The Playground is a shared environment that should not be used to run production workloads. The Playground is a great way to get started with Defang. You can even use [1-Click Deploy](/docs/tutorials/using-one-click-deploy) to try it out quickly or you can get started with the [Defang CLI](/docs/intro/getting-started). This page highlights architectural considerations when deploying to the Playground and any differences you might encounter when deploying to the Playground versus deploying to your own cloud account. @@ -14,7 +14,7 @@ The Playground allows only 1 deployed project at a time. Use the CLI `defang dow ## Overview -Overall, the Defang Playground is very similar to deploying to your own cloud account. The Playground runs on a Defang-managed AWS account, so you can expect it to work similarly to deploying to [AWS](./aws/aws.md). +Overall, the Defang Playground is very similar to deploying to your own cloud account. The Playground runs on a Defang-managed AWS account, so you can expect it to work similarly to deploying to [AWS](./aws). ### Managed services diff --git a/docs/tutorials/_category_.json b/docs/tutorials/_category_.json index b705ac5ea6..f1c122f289 100644 --- a/docs/tutorials/_category_.json +++ b/docs/tutorials/_category_.json @@ -1,7 +1,7 @@ { "label": "Tutorials", - "position": 300, "link": { + "slug": "tutorials", "type": "generated-index", "description": "Check out these tutorials to learn more about Defang." } diff --git a/docs/tutorials/configure-environment-variables.md b/docs/tutorials/configure-environment-variables.md index 1925bc63d0..d81bb9871d 100644 --- a/docs/tutorials/configure-environment-variables.md +++ b/docs/tutorials/configure-environment-variables.md @@ -11,7 +11,7 @@ This tutorial will show you how to configure sensitive environment variables in ## Pre-requisites * [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#install-the-defang-cli) +* [The Defang CLI](/docs/intro/getting-started#install-the-defang-cli) ## Step 1 - Go to your `compose.yaml` file :::info diff --git a/docs/tutorials/deploy-container-using-the-cli.mdx b/docs/tutorials/deploy-container-using-the-cli.mdx index dcb82d6714..d9bcd484d8 100644 --- a/docs/tutorials/deploy-container-using-the-cli.mdx +++ b/docs/tutorials/deploy-container-using-the-cli.mdx @@ -43,7 +43,7 @@ The example above shows a multi-container application with 3 services, `web`, `a 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). +Run the following command in the [Defang CLI](/docs/intro/getting-started#install-the-defang-cli). ```text defang compose up ``` diff --git a/docs/tutorials/deploy-to-aws.mdx b/docs/tutorials/deploy-to-aws.mdx index 4b46c8e14d..67f7d9dd38 100644 --- a/docs/tutorials/deploy-to-aws.mdx +++ b/docs/tutorials/deploy-to-aws.mdx @@ -9,7 +9,7 @@ This tutorial will show you how to deploy your services to your own AWS account ## Prerequisites -- [The Defang CLI](/docs/getting-started#install-the-defang-cli) +- [The Defang CLI](/docs/intro/getting-started#install-the-defang-cli) - [A Defang Account](/docs/concepts/authentication) - [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html) - [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) diff --git a/docs/tutorials/deploy-to-digitalocean.mdx b/docs/tutorials/deploy-to-digitalocean.mdx index 6f5fd143ab..b6a2294210 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 * [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#install-the-defang-cli) +* [The Defang CLI](/docs/intro/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-gcp.mdx b/docs/tutorials/deploy-to-gcp.mdx index 4c3ef9c525..664d685e33 100644 --- a/docs/tutorials/deploy-to-gcp.mdx +++ b/docs/tutorials/deploy-to-gcp.mdx @@ -9,7 +9,7 @@ This tutorial will show you how to deploy your services to your own GCP project ## Prerequisites -- [The Defang CLI](/docs/getting-started#install-the-defang-cli) +- [The Defang CLI](/docs/intro/getting-started#install-the-defang-cli) - [A Defang Account](/docs/concepts/authentication) - [gcloud CLI](https://cloud.google.com/sdk/docs/install) - [GCP Application Default Credentials](https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment) diff --git a/docs/tutorials/deploy-to-playground.mdx b/docs/tutorials/deploy-to-playground.mdx index 68b940d6b4..8a38b2f36d 100644 --- a/docs/tutorials/deploy-to-playground.mdx +++ b/docs/tutorials/deploy-to-playground.mdx @@ -9,7 +9,7 @@ This tutorial will show you how to deploy your project to the free [Defang Playg ## Prerequisites -- [The Defang CLI](/docs/getting-started#install-the-defang-cli) +- [The Defang CLI](/docs/intro/getting-started#install-the-defang-cli) - [A Defang Account](/docs/concepts/authentication) - [A `compose.yaml` file in your project](https://docs.docker.com/compose/gettingstarted/) - [A Dockerfile in your project](https://docs.docker.com/get-started/docker-concepts/building-images/writing-a-dockerfile/) or use [Railpack](../concepts/railpack.md) diff --git a/docs/tutorials/deploy-using-pulumi.mdx b/docs/tutorials/deploy-using-pulumi.mdx index ad8af78bef..7d66046453 100644 --- a/docs/tutorials/deploy-using-pulumi.mdx +++ b/docs/tutorials/deploy-using-pulumi.mdx @@ -16,7 +16,7 @@ This tutorial will show you how to deploy Minio with Pulumi using the Defang Pro * [A Defang Account](/docs/concepts/authentication) * [Pulumi CLI](https://www.pulumi.com/docs/install) -* [The Defang CLI](/docs/getting-started#install-the-defang-cli) +* [The Defang CLI](/docs/intro/getting-started#install-the-defang-cli) * [The Defang Pulumi Provider](/docs/concepts/pulumi#install-the-defang-pulumi-provider) ## Step 1 - Authenticate With Defang diff --git a/docs/tutorials/deploy-with-gpu.mdx b/docs/tutorials/deploy-with-gpu.mdx index 40055cc445..ef44f6d682 100644 --- a/docs/tutorials/deploy-with-gpu.mdx +++ b/docs/tutorials/deploy-with-gpu.mdx @@ -26,7 +26,7 @@ Note that GPU deployments are not permitted on the Defang Playground. You must [ ## Prerequisites - [A Defang Account](/docs/concepts/authentication) -- [The Defang CLI](/docs/getting-started#install-the-defang-cli) +- [The Defang CLI](/docs/intro/getting-started#install-the-defang-cli) - [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html) ### AWS Account with GPU Access @@ -49,7 +49,7 @@ You'll need to clone the [Mistral & vLLM](https://github.com/DefangLabs/samples/ ## Step 2 - Check your [Defang BYOC](../concepts/defang-byoc.md) settings -- Make sure you [install the latest version of the Defang CLI](/docs/getting-started#install-the-defang-cli) +- Make sure you [install the latest version of the Defang CLI](/docs/intro/getting-started#install-the-defang-cli) - 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/generate-new-code-using-ai.mdx b/docs/tutorials/generate-new-code-using-ai.mdx index ce90878afd..73f2ff9ae2 100644 --- a/docs/tutorials/generate-new-code-using-ai.mdx +++ b/docs/tutorials/generate-new-code-using-ai.mdx @@ -10,7 +10,7 @@ This tutorial will show you how to use Defang's AI agent to [generate](/docs/con ## Step 1 - Use the `defang generate` command in the CLI -Here you can describe what you would like the service to do and the [CLI](/docs/getting-started#install-the-defang-cli) will then [generate](/docs/concepts/generate) a project outline with all the files required to make it deployable with Defang. +Here you can describe what you would like the service to do and the [CLI](/docs/intro/getting-started#install-the-defang-cli) will then [generate](/docs/concepts/generate) a project outline with all the files required to make it deployable with Defang. In this tutorial, we'll use the following prompt to describe our service: diff --git a/docs/tutorials/index.mdx b/docs/tutorials/index.mdx new file mode 100644 index 0000000000..5801ba7cc7 --- /dev/null +++ b/docs/tutorials/index.mdx @@ -0,0 +1,40 @@ +--- +sidebar_position: 1 +title: Defang Tutorials +description: Learn how to use Defang +--- + +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; + +# Featured Tutorials: + + + +For a complete list of tutorials, check out the sidebar. diff --git a/docs/tutorials/migrating-from-heroku.md b/docs/tutorials/migrating-from-heroku.md index 78c116459b..305ca336ff 100644 --- a/docs/tutorials/migrating-from-heroku.md +++ b/docs/tutorials/migrating-from-heroku.md @@ -8,7 +8,7 @@ This tutorial will guide you through the process of migrating your Heroku applic ## Pre-requisites * [A Defang Account](/docs/concepts/authentication) -* [The Defang CLI](/docs/getting-started#install-the-defang-cli) +* [The Defang CLI](/docs/intro/getting-started#install-the-defang-cli) * [The Heroku CLI (optional, but recommended)](https://devcenter.heroku.com/articles/heroku-cli#install-the-heroku-cli) * Cloud Account Credentials * [AWS](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html) diff --git a/docs/tutorials/monitoring-your-services.md b/docs/tutorials/monitoring-your-services.md index d1962e7538..49ae9c7c50 100644 --- a/docs/tutorials/monitoring-your-services.md +++ b/docs/tutorials/monitoring-your-services.md @@ -17,7 +17,7 @@ When deploying to your own cloud, the primary way to monitor your services is th When deploying to Playground, your service's logs may be viewed in the [Defang Portal](https://portal.defang.dev). -By default when deploying, including to your own cloud, all output (stdout and stderr) from your app is logged and accessible via the [Defang CLI](/docs/getting-started#install-the-defang-cli). You can view these logs in real-time or for a time in the past. You can view logs for all your services, one service, or even one specific deployment of a service. +By default when deploying, including to your own cloud, all output (stdout and stderr) from your app is logged and accessible via the [Defang CLI](/docs/intro/getting-started#install-the-defang-cli). You can view these logs in real-time or for a time in the past. You can view logs for all your services, one service, or even one specific deployment of a service. ### Tailing Live Logs For All Services diff --git a/docs/tutorials/use-your-own-domain-name.mdx b/docs/tutorials/use-your-own-domain-name.mdx index 015c1a656b..45daecf9ea 100644 --- a/docs/tutorials/use-your-own-domain-name.mdx +++ b/docs/tutorials/use-your-own-domain-name.mdx @@ -11,7 +11,7 @@ This tutorial will show you how to set up and use your own domain when deploying ## Prerequisites * [A Defang Account](/docs/concepts/authentication) -* [The Defang CLI](/docs/getting-started#install-the-defang-cli) +* [The Defang CLI](/docs/intro/getting-started#install-the-defang-cli) * [AWS Account Credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html) ## Step 1 - Set up a Hosted Zone in AWS Route 53 diff --git a/docs/tutorials/using-one-click-deploy.md b/docs/tutorials/using-one-click-deploy.md index fc270fb3f6..915efaefa9 100644 --- a/docs/tutorials/using-one-click-deploy.md +++ b/docs/tutorials/using-one-click-deploy.md @@ -10,7 +10,7 @@ This tutorial will show you how to use Defang 1-Click Deploy to deploy a sample The 1-Click Deploy button is the easiest way for new users to deploy a sample project to the [Defang Playground](/docs/concepts/defang-playground). No CLI installation is required. :::info -To access the full range of features provided by Defang, we recommend using the [Defang CLI](/docs/getting-started). +To access the full range of features provided by Defang, we recommend using the [Defang CLI](/docs/intro/getting-started). ::: ## Step 1 - Choose a Sample @@ -45,7 +45,7 @@ Once logged in, you'll be redirected to GitHub. Click the "Create repository but A Github Action workflow will automatically start running to install Defang and deploy the sample to the Defang Playground. You can see this by going into the "Actions" tab in your GitHub repository. -You can view the status of your deployment in the [Defang Portal](https://portal.defang.dev/), or by downloading the [Defang CLI](/docs/getting-started). You can also see deployment progress in the "Actions" tab of your GitHub repository: +You can view the status of your deployment in the [Defang Portal](https://portal.defang.dev/), or by downloading the [Defang CLI](/docs/intro/getting-started). You can also see deployment progress in the "Actions" tab of your GitHub repository: github-actions-tab diff --git a/docusaurus.config.js b/docusaurus.config.js index e655a8042e..afce4213a8 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -83,11 +83,15 @@ const config = { { to: '/docs/intro', position: 'left', - label: 'Docs', + label: 'Overview', }, + { type: 'docSidebar', sidebarId: 'tutorialsSidebar', label: 'Tutorials', position: 'left' }, + { type: 'docSidebar', sidebarId: 'conceptsSidebar', label: 'Concepts', position: 'left' }, + { type: 'docSidebar', sidebarId: 'providersSidebar', label: 'Providers', position: 'left' }, + { type: 'docSidebar', sidebarId: 'cliSidebar', label: 'CLI', position: 'left' }, { to: 'https://defang.io/blog', label: 'Blog', position: 'left' }, { - href: '/docs/getting-started', + href: '/docs/intro/getting-started', label: 'Get Started', position: 'right', className: 'navbar__item-get_started' @@ -102,19 +106,19 @@ const config = { items: [ { label: 'Tutorials', - to: '/docs/category/tutorials', + to: '/docs/tutorials', }, { label: 'Providers', - to: '/docs/category/providers', + to: '/docs/providers', }, { label: 'CLI Reference', - to: '/docs/category/cli', + to: '/docs/cli', }, { label: 'Concepts', - to: '/docs/category/concepts', + to: '/docs/concepts', }, ], }, diff --git a/redirects.json b/redirects.json index 6c86b76daf..84d4411968 100644 --- a/redirects.json +++ b/redirects.json @@ -1,4 +1,24 @@ [ + { + "from": "/docs/getting-started", + "to": "/docs/intro/getting-started" + }, + { + "from": "/docs/category/tutorials", + "to": "/docs/tutorials" + }, + { + "from": "/docs/category/concepts", + "to": "/docs/concepts" + }, + { + "from": "/docs/category/providers", + "to": "/docs/providers" + }, + { + "from": "/docs/category/cli", + "to": "/docs/cli" + }, { "from": "/blog/2023/06/29/Announcing-the-Private-Beta-for-the-DOP", "to": "https://defang.io/blog/post/announcing-the-private-beta-for-the-defang-opinionated-platform" diff --git a/sidebars.js b/sidebars.js index 1c2488001d..d499891aff 100644 --- a/sidebars.js +++ b/sidebars.js @@ -13,10 +13,20 @@ /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { - // By default, Docusaurus generates a sidebar from the docs folder structure - docsSidebar: [ - {type: 'autogenerated', dirName: '.'}, - { type: 'link', label: 'Samples', href: 'https://defang.io/samples' }, + mainSidebar: [ + { type: 'autogenerated', dirName: 'intro' }, + ], + conceptsSidebar: [ + { type: 'autogenerated', dirName: 'concepts' }, + ], + tutorialsSidebar: [ + { type: 'autogenerated', dirName: 'tutorials' }, + ], + providersSidebar: [ + { type: 'autogenerated', dirName: 'providers' }, + ], + cliSidebar: [ + { type: 'autogenerated', dirName: 'cli' }, ], }; diff --git a/static/samples.json b/static/samples.json index 8ddc65bba2..7ba06ff800 100644 --- a/static/samples.json +++ b/static/samples.json @@ -32,7 +32,7 @@ { "name": "slackbot", "category": "golang", - "readme": "# Slackbot\n\nThis is a simple slackbot that takes a request and posts the message from the body to a slack channel.\n\n## Prerequisites\n\nInstall the Defang CLI by following the instructions in the [Defang CLI documentation](https://docs.defang.io/docs/getting-started).\n\n### Slack API Token\n\nYou'll need to head to https://api.slack.com/apps to create a Slack App.\n\nMake sure to:\n * Give it the bot `chat:write` scope\n * Install the app to your workspace\n * Copy the Bot User OAuth Access Token\n * Invite your bot to the channel you want it to post to using the `@botname` command in the channel (this will allow you to invite it)\n\n## Configure\n\nBefore deploying the Slackbot, you need to set up some config values. These config values are environment variables that the Slackbot needs to function correctly. The values are:\n\n- `SLACK_TOKEN`: This is the token you copied previously for the Slack API.\n- `SLACK_CHANNEL_ID`: This is the ID of the Slack channel where the bot will post messages.\n\nYou can set these config parameters using the `defang config set` command. Here's how:\n\n```sh\ndefang config set --name SLACK_TOKEN --value your_slack_token\ndefang config set --name SLACK_CHANNEL_ID --value your_slack_channel_id\n```\n\n## Deploy\n\nIf you have environment variables configured for your [own cloud account](https://docs.defang.io/docs/concepts/defang-byoc), this will deploy the application to your cloud account, otherwise it will deploy to the Defang playground.\n\n```sh\ndefang compose up\n```\n\n## Usage\n\nOnce the Slackbot is deployed, you can send a POST request to the `/` endpoint with a JSON body containing the message you want to post to the Slack channel. Here's an example:\n\n```sh\ncurl 'https://raphaeltm-bot--8080.prod1.defang.dev/' \\\n -H 'content-type: application/json' \\\n --data-raw $'{\"message\":\"This is your bot speaking. We\\'ll be landing in 10 minutes. Please fasten your seatbelts.\"}'\n```" + "readme": "# Slackbot\n\nThis is a simple slackbot that takes a request and posts the message from the body to a slack channel.\n\n## Prerequisites\n\nInstall the Defang CLI by following the instructions in the [Defang CLI documentation](https://docs.defang.io/docs/intro/getting-started).\n\n### Slack API Token\n\nYou'll need to head to https://api.slack.com/apps to create a Slack App.\n\nMake sure to:\n * Give it the bot `chat:write` scope\n * Install the app to your workspace\n * Copy the Bot User OAuth Access Token\n * Invite your bot to the channel you want it to post to using the `@botname` command in the channel (this will allow you to invite it)\n\n## Configure\n\nBefore deploying the Slackbot, you need to set up some config values. These config values are environment variables that the Slackbot needs to function correctly. The values are:\n\n- `SLACK_TOKEN`: This is the token you copied previously for the Slack API.\n- `SLACK_CHANNEL_ID`: This is the ID of the Slack channel where the bot will post messages.\n\nYou can set these config parameters using the `defang config set` command. Here's how:\n\n```sh\ndefang config set --name SLACK_TOKEN --value your_slack_token\ndefang config set --name SLACK_CHANNEL_ID --value your_slack_channel_id\n```\n\n## Deploy\n\nIf you have environment variables configured for your [own cloud account](https://docs.defang.io/docs/concepts/defang-byoc), this will deploy the application to your cloud account, otherwise it will deploy to the Defang playground.\n\n```sh\ndefang compose up\n```\n\n## Usage\n\nOnce the Slackbot is deployed, you can send a POST request to the `/` endpoint with a JSON body containing the message you want to post to the Slack channel. Here's an example:\n\n```sh\ncurl 'https://raphaeltm-bot--8080.prod1.defang.dev/' \\\n -H 'content-type: application/json' \\\n --data-raw $'{\"message\":\"This is your bot speaking. We\\'ll be landing in 10 minutes. Please fasten your seatbelts.\"}'\n```" }, { "name": "AWS S3", @@ -67,7 +67,7 @@ { "name": "chat", "category": "nodejs", - "readme": "# Minimal Chat App\n\nThis is a minimal chat application that shows how to use Socket.IO with Node.js with minimal code deployed with Defang.\n\n## Prerequisites\n\nInstall the Defang CLI by following the instructions in the [Defang CLI documentation](https://docs.defang.io/docs/getting-started).\n\n## Build and run the application\n\nIf you have environment variables configured for your [own cloud account](https://docs.defang.io/docs/concepts/defang-byoc), this will deploy the application to your cloud account, otherwise it will deploy to the Defang cloud.\n\n```sh\ndefang compose up\n```" + "readme": "# Minimal Chat App\n\nThis is a minimal chat application that shows how to use Socket.IO with Node.js with minimal code deployed with Defang.\n\n## Prerequisites\n\nInstall the Defang CLI by following the instructions in the [Defang CLI documentation](https://docs.defang.io/docs/intro/getting-started).\n\n## Build and run the application\n\nIf you have environment variables configured for your [own cloud account](https://docs.defang.io/docs/concepts/defang-byoc), this will deploy the application to your cloud account, otherwise it will deploy to the Defang cloud.\n\n```sh\ndefang compose up\n```" }, { "name": "document-starter", @@ -77,12 +77,12 @@ { "name": "minimal", "category": "nodejs", - "readme": "# Minimal Node.js example\n\nThis example shows how to build a minimal Node.js application using the [Node.js](https://nodejs.org/) runtime.\n\n## Prerequisites\n\nInstall the Defang CLI by following the instructions in the [Defang CLI documentation](https://docs.defang.io/docs/getting-started).\n\n## Build and run the application\n\nIf you have environment variables configured for your [own cloud account](https://docs.defang.io/docs/concepts/defang-byoc), this will deploy the application to your cloud account, otherwise it will deploy to the Defang cloud.\n\n```sh\ndefang compose up\n```" + "readme": "# Minimal Node.js example\n\nThis example shows how to build a minimal Node.js application using the [Node.js](https://nodejs.org/) runtime.\n\n## Prerequisites\n\nInstall the Defang CLI by following the instructions in the [Defang CLI documentation](https://docs.defang.io/docs/intro/getting-started).\n\n## Build and run the application\n\nIf you have environment variables configured for your [own cloud account](https://docs.defang.io/docs/concepts/defang-byoc), this will deploy the application to your cloud account, otherwise it will deploy to the Defang cloud.\n\n```sh\ndefang compose up\n```" }, { "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#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" + "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/intro/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#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" + "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/intro/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", @@ -107,7 +107,7 @@ { "name": "imgproxy", "category": "other", - "readme": "# ImgProxy\n\nImgProxy is a fast and secure standalone server for resizing and converting remote images. It's can be deployed using their official Docker image, as documented [here](https://docs.imgproxy.net/installation#docker).\n\n## Prerequisites\n\nInstall the Defang CLI by following the instructions in the [Defang CLI documentation](https://docs.defang.io/docs/getting-started).\n\n## Build and run the application\n\nIf you have environment variables configured for your [own cloud account](https://docs.defang.io/docs/concepts/defang-byoc), this will deploy the application to your cloud account, otherwise it will deploy to the Defang cloud.\n\n```sh\ndefang compose up\n```\n" + "readme": "# ImgProxy\n\nImgProxy is a fast and secure standalone server for resizing and converting remote images. It's can be deployed using their official Docker image, as documented [here](https://docs.imgproxy.net/installation#docker).\n\n## Prerequisites\n\nInstall the Defang CLI by following the instructions in the [Defang CLI documentation](https://docs.defang.io/docs/intro/getting-started).\n\n## Build and run the application\n\nIf you have environment variables configured for your [own cloud account](https://docs.defang.io/docs/concepts/defang-byoc), this will deploy the application to your cloud account, otherwise it will deploy to the Defang cloud.\n\n```sh\ndefang compose up\n```\n" }, { "name": "pulumi", From 23f47ee25bd0f2c0de3107e62d77e22b9d980a4f Mon Sep 17 00:00:00 2001 From: Jordan Stephens Date: Thu, 23 Oct 2025 12:37:19 -0700 Subject: [PATCH 3/3] cp cli-index.md after autogeneration --- cli-index.mdx | 42 ++++++++++++++++++++++++++++++++++++++++ docs/concepts/index.mdx | 2 +- docs/tutorials/index.mdx | 2 +- scripts/prebuild.sh | 1 + 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 cli-index.mdx diff --git a/cli-index.mdx b/cli-index.mdx new file mode 100644 index 0000000000..63de4ffb08 --- /dev/null +++ b/cli-index.mdx @@ -0,0 +1,42 @@ +--- +sidebar_position: 1 +title: Defang CLI Reference +description: Learn about the Defang CLI +--- + +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; + +The Defang CLI takes your app from Docker Compose to a secure and scalable deployment on your favorite cloud in minutes. + +# Featured Commands + + + +For a complete list of commands, check out the sidebar. diff --git a/docs/concepts/index.mdx b/docs/concepts/index.mdx index 7c4ef0efde..711e282b1e 100644 --- a/docs/concepts/index.mdx +++ b/docs/concepts/index.mdx @@ -6,7 +6,7 @@ description: Learn about Defang concepts import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; -# Featured Concepts: +# Featured Concepts