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/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/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/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 81% rename from docs/getting-started/authenticating.md rename to docs/concepts/authentication.md index 2217723d0..3410c757c 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: @@ -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. -::: \ No newline at end of file +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/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/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/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 new file mode 100644 index 000000000..e908c957d --- /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 With Defang](/docs/concepts/authentication) page. +::: + +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/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 deleted file mode 100644 index ce18273c5..000000000 --- a/docs/getting-started/getting-started.md +++ /dev/null @@ -1,112 +0,0 @@ ---- -sidebar_position: 200 -title: Getting Started -description: Get started with Defang. ---- - -# Getting Started - - -## Install the CLI - -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). - -## 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/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) - -## 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. [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) -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/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.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..982022b9a --- /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/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) +- 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/intro.mdx b/docs/intro/intro.mdx new file mode 100644 index 000000000..60b628e7e --- /dev/null +++ b/docs/intro/intro.mdx @@ -0,0 +1,46 @@ +--- +sidebar_position: 100 +title: Overview +description: Overview of Defang, a radically simpler way to develop, deploy, and debug production-ready cloud apps. +--- + +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; + +#   + +
+ 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 78% rename from docs/use-cases/use-cases.md rename to docs/intro/use-cases.md index 67ab4086c..0c3dced6b 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](/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. +:::info +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. diff --git a/docs/intro/what-is-defang.mdx b/docs/intro/what-is-defang.mdx new file mode 100644 index 000000000..3228c100f --- /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#install-the-defang-cli.md) includes an AI-driven agent that translates natural language prompts to an outline for your project that you can then refine. +- Defang can automatically build and deploy your project with a single command. + - If you’re new to Defang, you can try deploying to the [Defang Playground](/docs/concepts/defang-playground.md), a hosted environment to learn to use Defang with non-production workloads. + - Once you’re ready, you can [deploy](/docs/concepts/deployments.md) it to your own cloud account - we call this [Defang BYOC](/docs/concepts/defang-byoc.md). Defang takes care of all the heavy lifting such as configuring networking, security, [observability](/docs/concepts/observability.md) and all the other details that usually slow down the average cloud developer. +- You can also use Defang to easily [publish updates](/docs/concepts/deployments.md#deploying-updates) to your deployed application with zero downtime. 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/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/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-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 -``` diff --git a/docs/tutorials/deploy-to-aws.mdx b/docs/tutorials/deploy-to-aws.mdx index 5e4c60aea..925d96024 100644 --- a/docs/tutorials/deploy-to-aws.mdx +++ b/docs/tutorials/deploy-to-aws.mdx @@ -11,8 +11,8 @@ 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) -* [The Defang CLI](/docs/getting-started/installing) +* [A Defang Account](/docs/concepts/authentication) +* [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 @@ -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..49121fc46 100644 --- a/docs/tutorials/deploy-to-digitalocean.mdx +++ b/docs/tutorials/deploy-to-digitalocean.mdx @@ -11,8 +11,8 @@ 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) -* [The Defang CLI](/docs/getting-started/installing) +* [A Defang Account](/docs/concepts/authentication) +* [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-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. --- diff --git a/docs/tutorials/deploy-to-playground.mdx b/docs/tutorials/deploy-to-playground.mdx new file mode 100644 index 000000000..917dcbea6 --- /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/concepts/authentication) +* [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. +```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/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) 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/docs/tutorials/deploy-using-pulumi.mdx b/docs/tutorials/deploy-using-pulumi.mdx index 35e815da0..d69d2ce5d 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 --- @@ -9,9 +9,9 @@ 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](../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/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/getting-started/monitor.md b/docs/tutorials/monitoring-your-services.md similarity index 72% rename from docs/getting-started/monitor.md rename to docs/tutorials/monitoring-your-services.md index 21c949c80..47fb817af 100644 --- a/docs/getting-started/monitor.md +++ b/docs/tutorials/monitoring-your-services.md @@ -1,25 +1,25 @@ --- sidebar_position: 400 -title: Monitor Services -description: Monitor services with Defang. +title: Monitoring Your Services +description: How to monitoring services deployed with Defang --- -# Monitor a Service +# 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/) + + [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/tutorials/updating-your-services.md similarity index 85% rename from docs/getting-started/update.md rename to docs/tutorials/updating-your-services.md index b26ae32c3..f86976736 100644 --- a/docs/getting-started/update.md +++ b/docs/tutorials/updating-your-services.md @@ -1,13 +1,13 @@ --- sidebar_position: 500 -title: Update Services -description: Update services with Defang. +title: Updating Your Services +description: How to update services deployed with Defang --- -# Update Services +# 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. -::: \ No newline at end of file +::: diff --git a/docs/tutorials/use-your-own-domain-name.mdx b/docs/tutorials/use-your-own-domain-name.mdx index 7adc18fd1..c2376ddd4 100644 --- a/docs/tutorials/use-your-own-domain-name.mdx +++ b/docs/tutorials/use-your-own-domain-name.mdx @@ -12,10 +12,10 @@ 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): +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 ``` @@ -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/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..f1e97bb94 --- /dev/null +++ b/src/components/IntroGrid.tsx @@ -0,0 +1,14 @@ + +import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList"; +import type {PropSidebarItem} from '@docusaurus/plugin-content-docs'; + +const items: PropSidebarItem[] = [ + +] + +export default function() { + + return ( + + ); +} 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 81da04960..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/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#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/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#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", @@ -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 +]