Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/concepts/debug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Debug
description: Defang uses AI to help you debug your cloud applications.
sidebar_position: 650
---

# Debug

Defang includes an AI-driven tool to help you debug your cloud applications. The AI assistant will use your service logs as well as the files in your project to help you identify and resolve issues.

:::warning
The AI debugging assistant is currently in preview and is currently limited in its capabilities. We plan to expand the capabilities of the AI assistant in the future.
:::
15 changes: 10 additions & 5 deletions docs/concepts/ai.md → docs/concepts/generate.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
title: AI
description: How Defang uses AI to help you build and deploy your cloud applications.
title: Generate
description: Defang uses AI to help you generate a starting point for your cloud applications.
sidebar_position: 100
---

# AI

# Generate

Defang includes an AI-driven assistant that translates natural language prompts to an outline for your project that you can then refine. The AI assistant is available through the [Defang CLI](../getting-started/installing.md).

:::info
The AI assistant is currently in beta and only supports a limited set of prompts. We plan to expand the capabilities of the AI assistant in the future.
The AI assistant is currently in preview and only supports a limited set of prompts, varying in complexity. We plan to expand the capabilities of the AI assistant in the future.
:::

We are working on expanding the range of supported prompts and improving the accuracy of the AI assistant. If you have any feedback or suggestions, please let us know by [opening an issue](https://github.com/DefangLabs/defang/issues/new).
Expand Down Expand Up @@ -38,3 +37,9 @@ A simple next.js app that serves a static page
```
A simple api with a single route built on express
```

**An example of a more complex prompt**

```
A service that uses bullmq and redis. The compose file should also include a redis service. The code should setup a queue. It should also expose three endpoints with express: one to add a job to the queue, another to check how many tasks are in the queue, and a last one that runs on / which is just a healthcheck. The code should also include a worker that processes the queue by logging what's in each task. Use environment variables to configure the redis connection. No password.
```
43 changes: 43 additions & 0 deletions docs/concepts/managed-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: Managed Storage
description: Defang can help you provision managed storage services.
sidebar_position: 450
---

# Managed Storage

Defang helps you provision the infrastructure you need to run your services. That infrastructure is designed to scale in and out without persistent storage, so you can build highly scalable services. But Defang can also help you provision managed services to store and persist your data, like [caches](#managed-redis), databases[<sup>\*</sup>](#managed-postgres) , and object storage[<sup>\*</sup>](#managed-object-storage).

## Managed Redis

Redis is an in-memory data structure store widely used for caching, real-time analytics, and session management due to its high performance, low latency, and support for various data types. Defang can help you provision a managed Redis instance. To read more about the specifics of how this works for each provider, see the following:
- [Playground](../providers/playground#managed-redis)
- [AWS](../providers/aws#managed-redis)

### How to use Managed Redis

To use managed Redis, in your `compose.yaml` file, use the `x-defang-redis` extension to define your Redis service. Adding the annotation will tell Defang to provision a managed instance, rather than running Redis as a service. Here's an example:

```yaml
redisx:
image: redis:6.2
x-defang-redis: true
restart: unless-stopped
ports:
- mode: host
target: 6379
```

## Managed Postgres

:::info
As of July 22, 2024, managed Postgres is in development.
:::

Postgres, or PostgreSQL, is an advanced open-source relational database system known for its robustness, extensibility, and compliance with SQL standards, making it a popular choice for complex applications requiring reliable data integrity and sophisticated querying capabilities.

## Managed Object Storage

:::info
As of July 22, 2024, managed object storage is planned for future development.
:::
5 changes: 3 additions & 2 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Overview of Defang, a radically simpler way to build, deploy, and o

### What is Defang?

Defang is a radically simpler way for developers to build, deploy their apps to the cloud. Defang enables you to easily author cloud application in any language, build and deploy to the cloud with a single command, and iterate quickly.
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 assistant 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.
Expand All @@ -21,7 +21,8 @@ Defang provides a streamlined experience to develop, deploy, observe, and update

- 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 assistant](./concepts/ai.md) to go from natural language prompt to an outline project
- Built-in AI assistant to go [from natural language prompt to an outline project](./concepts/generate.md)
- Built-in AI assistant 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
Expand Down
6 changes: 5 additions & 1 deletion docs/providers/aws.md
Original file line number Diff line number Diff line change
@@ -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: 010
---

# AWS
Expand Down Expand Up @@ -43,3 +43,7 @@ To deploy your services, the Defang CLI packages your code and uploads it to an
### Runtime

The provider runs your workloads using ECS using Fargate. It provisions a VPC with public and private subnets, and deploys your services to the private subnets. It then provisions an Application Load Balancer (ALB) and routes traffic to your services.

### Managed Redis

When using [Managed Redis](../concepts/managed-storage.md#managed-redis), the Defang CLI provisions an ElastiCache Redis cluster in your account.
18 changes: 18 additions & 0 deletions docs/providers/playground.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: Playground
description: The Defang Playground is a free tier that allows you to experiment with Defang.
sidebar_position: 000
---

The Defang Playground is a free tier that allows you to experiment with Defang. The Playground is a shared that cannot be used to run production workloads. The Playground is a great way to get started with Defang and to experiment with the Defang CLI.

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.

## 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.md).

## Managed Redis

The playground supports [Managed Redis](../concepts/managed-storage.md#managed-redis). Fundamentally, this works the same as it does in [AWS](./aws.md#managed-redis).