Skip to content

Commit

Permalink
Merge pull request #24 from defang-io/byoc
Browse files Browse the repository at this point in the history
Update sidebar positions in documentation and add networking details
  • Loading branch information
raphaeltm authored Feb 9, 2024
2 parents 858ec86 + c59c7f0 commit 677fc19
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/concepts/compose.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Compose
description: Defang allows you to use the compose.yaml specification to deploy your application to the cloud.
sidebar_position: 400
sidebar_position: 150
---

# Compose

You might be familiar with [docker-compose.yml](https://docs.docker.com/compose/compose-file/) files, now known as the Compose specification and `compose.yaml` files. It's a simple way to define and run multi-container Docker applications. Defang allows you to use `compose.yaml` files to deploy your application to the cloud.
You might be familiar with `docker-compose.yml` files, now known as the [Compose specification](https://docs.docker.com/compose/compose-file/) and `compose.yaml` files. It's a simple way to define and run multi-container Docker applications. Defang allows you to use `compose.yaml` files to deploy your application to the cloud.

## How it works

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/configuration.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Configuration
description: Configuring your Defang application.
sidebar_position: 350
sidebar_position: 225
---

# Configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/deployments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Deployment
description: Defang will build your services in the cloud and manage the deployment process for you.
sidebar_position: 250
sidebar_position: 500
---

# Deployment
Expand Down
7 changes: 0 additions & 7 deletions docs/concepts/networking.md

This file was deleted.

71 changes: 71 additions & 0 deletions docs/concepts/networking.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Networking
description: Defang helps you safely configure your services' networking.
sidebar_position: 300
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Networking

Defang configures Security Groups, deploys applications to a private subnet and uses an Application Load Balancer to route traffic to your services from the public internet only when required.

To make your service accessible from the public internet, you can expose ports in your service definition. In a [`compose.yaml`](./compose.md) file, you can use the `ports` section of your service definition. In a [Pulumi program](./pulumi.md), you can use the `ports` property of your service definition.


<Tabs>
<TabItem value="compose" label="Compose" default>
```yaml
services:
# [...]
serviceName:
ports:
- mode: ingress
target: 3000
protocol: http
```
</TabItem>
<TabItem value="pulumi" label="Pulumi">
```typescript
const service = new defang.DefangService("serviceName", {
// [...]
ports: [{
target: 3000,
mode: "ingress",
protocol: "http",
}],
});
```
</TabItem>
</Tabs>

## Internal Communication

Internal communication between services is done using a combination of the username and service name. For example, if you are logged in as `developer1` have services called `service1` and `service2` and `service1` has port `3000` exposed, you can communicate with `service1` from `service2` using `http://developer1-service1`.


<Tabs>
<TabItem value="compose" label="Compose" default>
```yaml
services:
# [...]
service1:
ports:
- mode: host
target: 3000
protocol: http
```
</TabItem>
<TabItem value="pulumi" label="Pulumi">
```typescript
const service = new defang.DefangService("service1", {
// [...]
ports: [{
target: 3000,
mode: "host",
protocol: "http",
}],
});
```
</TabItem>
</Tabs>
2 changes: 1 addition & 1 deletion docs/concepts/portal.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ You can log into the Defang portal at [portal.defang.dev](https://portal.defang.
You can use the portal to get an overview of your services, view the logs for each service, quickly access exposed ports, view environment variables, and more.

:::info
We will make sure you have access to the tools required to debug your services in production. At the moment we're not entirely sure what that will look like, but we're working on it!
We will make sure you have access to the tools required to debug your services in production. At the moment we're not entirely sure what that will look like, beyond `defang tail` to view logs, but we're working on it!
:::
2 changes: 1 addition & 1 deletion docs/concepts/pulumi.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Pulumi
description: Define your Defang services with Pulumi to integrate with other cloud resources.
sidebar_position: 400
sidebar_position: 175
---

import Tabs from '@theme/Tabs';
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/resources.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Resources
description: Customize the resources your Defang services use.
sidebar_position: 275
sidebar_position: 350
---

# Resources
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/secrets.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Secrets
description: Secrets are a way to securely store sensitive information such as API keys, passwords, and other credentials.
sidebar_position: 300
sidebar_position: 250
---

# Secrets
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/security.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Security
description: Defang configures your cloud applications and services with security best practices.
sidebar_position: 600
sidebar_position: 275
---

# Security
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: How to install Defang.

# Installing

Defang doesn't require installing anything in your cloud, but you will need to install the Defang command line interface (CLI) to interact with your Defang resources and account.
Defang doesn't require installing anything in your cloud, but you will need to install the [open source](https://github.com/defang-io/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 Homebrew, a bash script, or download the binary directly.

Expand Down

0 comments on commit 677fc19

Please sign in to comment.