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
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This file format may look familiar to you if you've come across `docker-compose.
12
12
13
13
## How It Works
14
14
15
-
You can create a `compose.yaml` file in the root of your project, or use the [`defang generate`](../tutorials/generate-new-code-using-ai.mdx) command to create one for you (along with other resources). This file is used to define your application's [services](./services.md) and how they run. You can edit this file to add more services or change the configuration of existing services.
15
+
You can create a `compose.yaml` file in the root of your project, or use the [`defang generate`](../tutorials/generate-new-code-using-ai.mdx) command to create one for you (along with other resources). This file is used to define your application's [services](./services.md) and how they run. You can edit this file to add more services or change the configuration of services.
16
16
17
17
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.
18
18
@@ -22,14 +22,14 @@ Here is a basic `compose.yaml` file that contains all the required properties fo
22
22
```yaml
23
23
services:
24
24
service-example:
25
-
image: nginx:latest # use one of: an image (shown on this line) or a build (shown below)
25
+
image: nginx:latest # use one of: image (shown on this line) or build (shown below)
26
26
# build:
27
27
# context: .
28
28
# dockerfile: Dockerfile
29
29
ports:
30
30
- mode: ingress # specify ports to expose
31
31
target: 8080
32
-
published: 80
32
+
published: 8080# this is useful for running locally
33
33
34
34
```
35
35
@@ -73,7 +73,7 @@ The version of the Compose file format being used. This property is now obsolete
73
73
```
74
74
75
75
### `volumes`
76
-
(Unsupported)
76
+
(Not yet supported)
77
77
78
78
The volume mounts for a container, reusable across services. This feature is not currently supported by Defang.
79
79
@@ -138,7 +138,7 @@ deploy:
138
138
```
139
139
140
140
### `depends_on`
141
-
(Unsupported)
141
+
(Not yet supported)
142
142
143
143
This property describes startup dependencies between services. This feature is currently unsupported by Defang, but can be useful in local developments such as Docker.
144
144
@@ -170,10 +170,10 @@ For sensitive environment variables (or secret values), you should list the vari
170
170
171
171
[This property](https://github.com/compose-spec/compose-spec/blob/main/05-services.md#healthcheck) describes a check that will be run to determine whether or not a service's containers are "healthy". It works in the same way, and has the same default values, as the [HEALTHCHECK Dockerfile instruction](https://docs.docker.com/engine/reference/builder/#healthcheck) set by the service's Docker image. Your Compose file can override the values set in the Dockerfile.
172
172
173
-
When using Defang, your compose file must have a healthcheck if you want to expose a port—even if your Dockerfile already contains one.
173
+
When using Defang, your Compose file must have a healthcheck if you want to expose an `ingress` port—even if your Dockerfile already contains one.
174
174
175
175
:::note
176
-
`curl`is commonly used for containers with a `slim`-based image, and `wget` is used for containers with an `alpine`-based image.
176
+
`curl`is commonly used for containers with an Ubuntu-based image, and `wget` is used for containers with an `alpine`-based image.
177
177
:::
178
178
179
179
```yaml
@@ -232,7 +232,7 @@ The ports to expose. The default port mode is `ingress`.
0 commit comments