Skip to content

Commit 74685d8

Browse files
committed
adjust examples
1 parent f33e5f9 commit 74685d8

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

docs/concepts/compose-support.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ Here is a basic `compose.yaml` file that contains all the required properties fo
1111

1212
```yaml
1313
services:
14-
service-example:
15-
image: nginx:latest # specify an image (or a build, as shown below — one of the two is required)
16-
# build:
17-
# context: .
18-
# dockerfile: Dockerfile
19-
ports:
20-
- mode: ingress # specify ports to expose
21-
target: 8080
22-
published: 80
14+
service-example:
15+
image: nginx:latest # use one of: an image (shown on this line) or a build (shown below)
16+
# build:
17+
# context: .
18+
# dockerfile: Dockerfile
19+
ports:
20+
- mode: ingress # specify ports to expose
21+
target: 8080
22+
published: 80
2323

2424
```
2525
@@ -51,8 +51,6 @@ Note that in your Compose file, you will need a top-level property called `servi
5151
services:
5252
service:
5353
build: ...
54-
another-service:
55-
build: ...
5654
```
5755
:::
5856

@@ -83,11 +81,10 @@ The runtime constraints or reuqirements for how your services will be deployed a
8381

8482
```yaml
8583
deploy:
86-
replicas: 2
84+
replicas: 1
8785
reservations:
86+
cpus: '0.5'
8887
memory: 256M
89-
cpu: 1
90-
9188
```
9289

9390
### `environment`
@@ -107,14 +104,14 @@ The healthcheck endpoints for the container. Note that `curl` is commonly used f
107104

108105
```yaml
109106
healthcheck:
110-
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
107+
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
111108
```
112109

113110
or
114111

115112
```yaml
116113
healthcheck:
117-
test: ["CMD", "wget", "--spider", "http://localhost:3000"]
114+
test: ["CMD", "wget", "--spider", "http://localhost:3000"]
118115
```
119116

120117
### `image`

0 commit comments

Comments
 (0)