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-support.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ sidebar_position: 160
6
6
7
7
# Compose Support
8
8
9
-
## Required Compose File
9
+
## Example of a Compose File
10
10
Here is a basic `compose.yaml` file that contains all the required properties for deployment in Defang.
11
11
12
12
```yaml
@@ -40,10 +40,10 @@ services:
40
40
### `version`
41
41
(Deprecated)
42
42
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.
44
44
45
45
```yaml
46
-
version: '3' # deprecated
46
+
# version: '3'
47
47
```
48
48
49
49
### `volumes`
@@ -52,11 +52,11 @@ version: '3' # deprecated
52
52
The volume mounts for a container, reusable across services. This feature is not currently supported by Defang.
53
53
54
54
```yaml
55
-
volumes: # unsupported
56
-
db-data:
55
+
# volumes:
56
+
# db-data:
57
57
```
58
58
59
-
## Compose Service Properties
59
+
## Compose Service-level Properties
60
60
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.
61
61
62
62
:::tip
@@ -113,15 +113,14 @@ deploy:
113
113
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.
114
114
115
115
```yaml
116
-
depends_on: # unsupported
117
-
- db
116
+
# depends_on:
117
+
# - db
118
118
```
119
119
120
120
### `environment`
121
121
(Optional)
122
122
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.
125
124
```yaml
126
125
environment:
127
126
DATABASE_USER: someuser
@@ -133,6 +132,10 @@ environment:
133
132
- DATABASE_PASSWORD
134
133
```
135
134
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
+
136
139
### `healthcheck`
137
140
(Optional, but required for healthchecks on services with a published port)
138
141
@@ -162,7 +165,7 @@ image: nginx:latest
162
165
### `networks`
163
166
(Optional)
164
167
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.
166
169
167
170
```yaml
168
171
networks:
@@ -208,9 +211,6 @@ restart: unless-stopped
208
211
The volume mounts for a container, specific to a service. This feature is not currently supported by Defang.
209
212
210
213
```yaml
211
-
volumes: # unsupported
212
-
- "./backend:/app"
214
+
# volumes:
215
+
# - "./backend:/app"
213
216
```
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