You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/compose.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ You might be familiar with `docker-compose.yml` files, now known as the [Compose
12
12
13
13
You can define your [services](./services.md) using a `compose.yaml` file in the root of your project, or use the [`defang generate` command](../tutorials/generate-new-code-using-ai.mdx) to generate one (along with other resources). This file is used to define your application's services and how they run. You can edit this file to add more services or change the configuration of existing services.
14
14
15
-
When you run `defang up`, Defang will read your `compose.yaml` file and [deploy](./deployments.md) the services named in that file to the cloud.
15
+
When you run `defang compose up`, Defang will read your `compose.yaml` file and [deploy](./deployments.md) the services named in that file to the cloud.
16
16
17
17
## Service Name Resolution
18
18
@@ -41,4 +41,4 @@ secrets:
41
41
42
42
:::info Configuration & Secrets
43
43
Read more about configuration in the [configuration page](./configuration.md) and about secrets in the [secrets page](./configuration.md).
Copy file name to clipboardExpand all lines: docs/concepts/domains.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,15 +75,15 @@ You can also bring your own domain to a Defang project. This allows you to use y
75
75
76
76
### BYOC or Defang Playground
77
77
78
-
If you are using [Defang BYOC](./defang-byoc.md) and *do not* have your domain's DNS hosted with your cloud provider, you will need to follow this flow:
78
+
If you are using [Defang BYOC](./defang-byoc.md) and *do not* have your domain's DNS hosted with your cloud provider, or if you are using the [Defang Playground](./defang-playground.md), you will need to follow this flow:
79
79
80
80
1. Add the `domainname` to your service definition.
81
81
2. Run `defang compose up` to deploy your project.
82
82
3. Run `defang cert generate` to generate an SSL certificate. This command will provide instructions for where to point your domain's DNS before the certificate can be issued.
83
83
84
84
### BYOC
85
85
86
-
If you are using [Defang BYOC](./defang-byoc.md) and the DNS for your domain is hosted with your cloud provider (i.e. a Hosted Zone in Route 53, if you're using AWS), all you need to do is specify the `domainname` in your service definition, as in the example below.
86
+
If you are using [Defang BYOC](./defang-byoc.md)*and the DNS for your domain is hosted with your cloud provider* (i.e. a Hosted Zone in Route 53, if you're using AWS), all you need to do is specify the `domainname` in your service definition, as in the example below.
87
87
88
88
:::warning
89
89
For the time being, you can only use one domain per service.
Copy file name to clipboardExpand all lines: docs/concepts/observability.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
---
2
-
title: Observability
2
+
title: Observability
3
3
description: Monitor and debug your Defang services with the Defang CLI and portal.
4
4
sidebar_position: 600
5
5
---
6
6
7
7
# Observability
8
8
9
-
You can easily monitor and debug your Defang services at build and runtime using the Defang CLI and portal.
9
+
You can easily monitor and debug your Defang services at build and runtime using the Defang CLI and portal.
10
10
11
-
When you deploy a service using the `defang up` the CLI will automatically start tailing the build and runtime logs for your service. You can also view the logs for your service in the portal, or by using the `defang tail` command.
11
+
When you deploy a service using the `defang compose up` the CLI will automatically start tailing the build and runtime logs for your service. You can also view the logs for your service in the portal, or by using the `defang tail` command.
12
12
13
13
:::warning
14
14
Keep in mind that the Defang Portal only displays services deployed to Defang Playground.
@@ -25,4 +25,4 @@ defang tail --etag ua119053ehi2
25
25
26
26
## Architecture
27
27
28
-
In [BYOC](./defang-byoc.md), output is logged to the native logging tools within your cloud provider. The CLI then tails the output as needed.
28
+
In [BYOC](./defang-byoc.md), output is logged to the native logging tools within your cloud provider. The CLI then tails the output as needed.
Copy file name to clipboardExpand all lines: docs/faq.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,3 +144,31 @@ secrets:
144
144
145
145
### "Stack:… is in UPDATE_COMPLETE_CLEANUP_IN_PROGRESS state and cannot be updated"
146
146
- This happens if different version of the Defang CLI are used with the same AWS account. Each version one will try to update the CD stack to its version, back and forth. Make sure that all users have the same version of the CLI. Check the CLI version using `defang version`.
147
+
148
+
### "invalid healthcheck: ingress ports require an HTTP healthcheck on `localhost`.
149
+
150
+
- This message is displayed when `defang compose up` tries to deploy a service with an "ingress" port, if the service does not have a `healthcheck` which mentions `localhost`. Defang routes a load balancer to your service's ingress ports, and the loadbalancer needs to be able to check the health of the service. To solve this issue, ask yourself these two questions:
151
+
152
+
1. Should my service be public? It's common to declare your container's ports using the Compose file "shorthand" syntax (`1234:1234`). This syntax can be understood as `[HOST:]CONTAINER`. If your service is not intended to be public, you do not need to declare a HOST port. For example:
153
+
154
+
```diff
155
+
services:
156
+
my-service:
157
+
image: my-image
158
+
ports:
159
+
- - "1234:1234"
160
+
+ - "1234"
161
+
```
162
+
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:
Copy file name to clipboardExpand all lines: docs/getting-started/getting-started.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,21 +47,21 @@ Defang supports various ways of creating and deploying services to the cloud. Th
47
47
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.
Copy file name to clipboardExpand all lines: docs/getting-started/installing.md
+32-23Lines changed: 32 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,40 +3,49 @@ sidebar_position: 100
3
3
title: Installing
4
4
description: How to install Defang.
5
5
---
6
+
import Tabs from '@theme/Tabs';
7
+
import TabItem from '@theme/TabItem';
6
8
7
-
# Installing
9
+
# How to Install Defang
8
10
9
11
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.
10
12
11
-
We offer a few different ways to install the Defang CLI. You can use Homebrew, a bash script, Winget, or download the binary directly.
13
+
We offer a few different ways to install the Defang CLI. You can use a bash script, Homebrew, Winget, or you can download the binary directly.
12
14
13
-
## Using Homebrew
14
15
15
-
You can easily install the Defang CLI using [Homebrew](https://brew.sh/). Run the following command in your terminal:
16
+
<Tabs>
17
+
<TabItemvalue="bash"label="Bash">
18
+
## Using a Bash Script
16
19
17
-
```bash
18
-
brew install DefangLabs/defang/defang
19
-
```
20
+
You can install the Defang CLI using a bash script. Run the following command in your terminal:
20
21
21
-
## Using a Bash Script
22
+
```bash
23
+
. <(curl -Ls s.defang.io/install)
24
+
```
22
25
23
-
You can install the Defang CLI using a bash script. Run the following command in your terminal:
26
+
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.
27
+
</TabItem>
28
+
<TabItemvalue="homebrew"label="Homebrew"default>
29
+
## Using Homebrew
24
30
25
-
```bash
26
-
.<(curl -Ls s.defang.io/install)
27
-
```
31
+
You can easily install the Defang CLI using [Homebrew](https://brew.sh/). Run the following command in your terminal:
28
32
29
-
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.
33
+
```bash
34
+
brew install DefangLabs/defang/defang
35
+
```
36
+
</TabItem>
37
+
<TabItemvalue="winget"label="Winget">
38
+
## Using Winget
30
39
31
-
## Using Winget
40
+
On Windows, you can install the Defang CLI using `winget`. Run the following command in your terminal:
32
41
33
-
On Windows, you can install the Defang CLI using `winget`. Run the following command in your terminal:
34
-
35
-
```powershell
36
-
winget install defang
37
-
```
38
-
39
-
## Direct Download
40
-
41
-
You can find the latest version of the Defang CLI on the [releases page](https://github.com/DefangLabs/defang/releases). Just download the appropriate binary for your operating system and architecture, and put it somewhere in your `PATH`.
42
+
```powershell
43
+
winget install defang
44
+
```
45
+
</TabItem>
46
+
<TabItemvalue="direct"label="Direct Download">
47
+
## Direct Download
42
48
49
+
You can find the latest version of the Defang CLI on the [releases page](https://github.com/DefangLabs/defang/releases). Just download the appropriate binary for your operating system and architecture, and put it somewhere in your `PATH`.
0 commit comments