Skip to content

Commit 793e617

Browse files
Apply suggestions from code review
Co-authored-by: Jordan Stephens <[email protected]>
1 parent c2796f3 commit 793e617

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

docs/concepts/compose.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Defang identifies services by the [account username](./accounts.md) and the serv
6464
### `version`
6565
(Deprecated)
6666

67-
The version of the Compose file format being used. This feature is no longer supported and will be ignored by Defang.
67+
The version of the Compose file format being used. This property is now obsolete, and will be ignored by Defang.
6868

6969
```yaml
7070
# version: '3'
@@ -105,7 +105,7 @@ services:
105105
### `build`
106106
(Required, unless `image` is defined)
107107

108-
The build configuration.
108+
The [build configuration](https://github.com/compose-spec/compose-spec/blob/main/build.md). This property describes how to create an OCI container for this service.
109109

110110
```yaml
111111
build:
@@ -125,7 +125,7 @@ command: nginx -g 'daemon off;'
125125
### `deploy`
126126
(Optional)
127127

128-
The runtime constraints or requirements for how your services will be deployed and managed across different environments (e.g. memory reservations, replicas, number of CPUs, etc.).
128+
The [Deploy Specification](https://github.com/compose-spec/compose-spec/blob/main/deploy.md) describes the runtime constraints and requirements for how your services will be deployed and managed across different environments (e.g. memory reservations, replicas, number of CPUs, etc.).
129129

130130
```yaml
131131
deploy:
@@ -138,7 +138,7 @@ deploy:
138138
### `depends_on`
139139
(Unsupported)
140140

141-
The services that need to be started before this service can run. This feature is currently unsupported by Defang, but can be useful in local developments such as Docker.
141+
This property describes startup dependencies between services. This feature is currently unsupported by Defang, but can be useful in local developments such as Docker.
142142

143143
```yaml
144144
# depends_on:
@@ -148,7 +148,7 @@ The services that need to be started before this service can run. This feature i
148148
### `environment`
149149
(Optional)
150150

151-
The environment variables to set. For sensitive environment variables, you can set them with a blank or `null` value.
151+
The environment variables to set.
152152
```yaml
153153
environment:
154154
DATABASE_USER: someuser
@@ -169,24 +169,36 @@ After you set sensitive environment variables as blank or `null` values in the `
169169
### `healthcheck`
170170
(Optional, but required for healthchecks on services with a published port)
171171

172-
The healthcheck endpoints for the container. Note that `curl` is commonly used for containers with a `slim`-based image, and `wget` is used for containers with an `alpine`-based image.
172+
[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.
173+
174+
When using Defang, your compose file must have a healthcheck if you want to expose a port—even if your dockerfile already contains one
175+
176+
:::note
177+
`curl` is commonly used for containers with a `slim`-based image, and `wget` is used for containers with an `alpine`-based image.
178+
:::
173179

174180
```yaml
175181
healthcheck:
176182
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
183+
interval: 30s
184+
timeout: 90s
185+
retries: 3
177186
```
178187

179188
or
180189

181190
```yaml
182191
healthcheck:
183192
test: ["CMD", "wget", "--spider", "http://localhost:8080/"]
193+
interval: 30s
194+
timeout: 90s
195+
retries: 3
184196
```
185197

186198
### `image`
187199
(Required, unless `build` is defined)
188200

189-
The image to run.
201+
[This property](https://github.com/compose-spec/compose-spec/blob/main/05-services.md#image) describes the image from which your container should start.
190202

191203
```yaml
192204
image: nginx:latest
@@ -210,6 +222,8 @@ networks:
210222
- app
211223
```
212224

225+
See our [Networking](/docs/concepts/networking) page for more.
226+
213227
### `ports`
214228
(Optional, but required if you want to access the service from outside the container)
215229

0 commit comments

Comments
 (0)