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
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Defang identifies services by the [account username](./accounts.md) and the serv
64
64
### `version`
65
65
(Deprecated)
66
66
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.
68
68
69
69
```yaml
70
70
# version: '3'
@@ -105,7 +105,7 @@ services:
105
105
### `build`
106
106
(Required, unless `image` is defined)
107
107
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.
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.).
129
129
130
130
```yaml
131
131
deploy:
@@ -138,7 +138,7 @@ deploy:
138
138
### `depends_on`
139
139
(Unsupported)
140
140
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.
142
142
143
143
```yaml
144
144
# depends_on:
@@ -148,7 +148,7 @@ The services that need to be started before this service can run. This feature i
148
148
### `environment`
149
149
(Optional)
150
150
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.
152
152
```yaml
153
153
environment:
154
154
DATABASE_USER: someuser
@@ -169,24 +169,36 @@ After you set sensitive environment variables as blank or `null` values in the `
169
169
### `healthcheck`
170
170
(Optional, but required for healthchecks on services with a published port)
171
171
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.
[This property](https://github.com/compose-spec/compose-spec/blob/main/05-services.md#image) describes the image from which your container should start.
190
202
191
203
```yaml
192
204
image: nginx:latest
@@ -210,6 +222,8 @@ networks:
210
222
- app
211
223
```
212
224
225
+
See our [Networking](/docs/concepts/networking) page for more.
226
+
213
227
### `ports`
214
228
(Optional, but required if you want to access the service from outside the container)
0 commit comments