Skip to content

Commit 10f37b9

Browse files
committed
update compose support
1 parent 39917f9 commit 10f37b9

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

docs/concepts/compose-support.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 160
66

77
# Compose Support
88

9-
## Required Compose File
9+
## Example of a Compose File
1010
Here is a basic `compose.yaml` file that contains all the required properties for deployment in Defang.
1111

1212
```yaml
@@ -40,10 +40,10 @@ services:
4040
### `version`
4141
(Deprecated)
4242

43-
The version of the Compose file format being used. This feature is deprecated and will be ignored by Defang.
43+
The version of the Compose file format being used. This feature is no longer supported and will be ignored by Defang.
4444

4545
```yaml
46-
version: '3' # deprecated
46+
# version: '3'
4747
```
4848

4949
### `volumes`
@@ -52,11 +52,11 @@ version: '3' # deprecated
5252
The volume mounts for a container, reusable across services. This feature is not currently supported by Defang.
5353

5454
```yaml
55-
volumes: # unsupported
56-
db-data:
55+
# volumes:
56+
# db-data:
5757
```
5858

59-
## Compose Service Properties
59+
## Compose Service-level Properties
6060
Here are a list of service-level properties of the [Compose specification](https://docs.docker.com/compose/compose-file/) that Defang supports when writing a `compose.yaml` file.
6161

6262
:::tip
@@ -113,15 +113,14 @@ deploy:
113113
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.
114114

115115
```yaml
116-
depends_on: # unsupported
117-
- db
116+
# depends_on:
117+
# - db
118118
```
119119

120120
### `environment`
121121
(Optional)
122122

123-
The environment variables to set. For sensitive environment variables, you can set them with a blank or `null` value. See our page on [Configuration](/docs/concepts/configuration) for more.
124-
123+
The environment variables to set. For sensitive environment variables, you can set them with a blank or `null` value.
125124
```yaml
126125
environment:
127126
DATABASE_USER: someuser
@@ -133,6 +132,10 @@ environment:
133132
- DATABASE_PASSWORD
134133
```
135134

135+
:::info
136+
After you set sensitive environment variables as blank or `null` values in the `compose.yaml` file, you can securely set their actual value in the Defang CLI. See how Defang handles [Configuration](/docs/concepts/configuration) for more.
137+
:::
138+
136139
### `healthcheck`
137140
(Optional, but required for healthchecks on services with a published port)
138141

@@ -162,7 +165,7 @@ image: nginx:latest
162165
### `networks`
163166
(Optional)
164167

165-
The network configuration. Can be `public`, where Defang will assign a public IP address, or `private`, in which Defang will not.
168+
The network configuration. Can be `public`, where Defang will assign a public IP address, or `private`, in which Defang will not. To avoid warnings, add this to the `networks` top-level property as well.
166169

167170
```yaml
168171
networks:
@@ -208,9 +211,6 @@ restart: unless-stopped
208211
The volume mounts for a container, specific to a service. This feature is not currently supported by Defang.
209212

210213
```yaml
211-
volumes: # unsupported
212-
- "./backend:/app"
214+
# volumes:
215+
# - "./backend:/app"
213216
```
214-
215-
### Configuration
216-
You can define sensitive environment variables/configuration for Defang by writing out the variable name and leaving it in as a blank or `null` value in the Compose file. See our [Configuration](/docs/concepts/configuration) page for more.

0 commit comments

Comments
 (0)