Skip to content

Commit 694149c

Browse files
authored
docs: use host directory for data volume in default example (#414)
1 parent 39a562f commit 694149c

File tree

4 files changed

+21
-37
lines changed

4 files changed

+21
-37
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
- "[0-9]+.[0-9]+.[0-9]+"
1010
paths-ignore:
1111
- README.md
12+
- "examples/**"
13+
- "docs/**"
1214
pull_request:
1315
branches:
1416
- master

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -224,26 +224,33 @@ When finished, detach from the server console using Ctrl-p, Ctrl-q
224224
## Deploying with Docker Compose
225225

226226
The [examples](examples) directory contains [an example Docker compose file](examples/docker-compose.yml) that declares:
227-
- a service running the bedrock server container and exposing UDP port 19132
228-
- a volume to be attached to the service
227+
- a service running the bedrock server container and exposing UDP port 19132. In the example is named "bds", short for "Bedrock Dedicated Server", but you can name the service whatever you want
228+
- a volume attached to the service at the container path `/data`
229229

230-
The service configuration includes some examples of configuring the server properties via environment variables:
231230
```yaml
232-
environment:
233-
EULA: "TRUE"
234-
GAMEMODE: survival
235-
DIFFICULTY: normal
231+
services:
232+
bds:
233+
image: itzg/minecraft-bedrock-server
234+
environment:
235+
EULA: "TRUE"
236+
ports:
237+
- "19132:19132/udp"
238+
volumes:
239+
- ./data:/data
240+
stdin_open: true
241+
tty: true
236242
```
237243
238-
From with in the `examples` directory, you can deploy the composition by using:
244+
Start the server and run in the background using:
239245
240246
```bash
241-
docker-compose up -d
247+
docker compose up -d
242248
```
243249

244-
You can follow the logs using:
250+
You can follow the logs at any time using:
251+
245252
```bash
246-
docker-compose logs -f bds
253+
docker compose logs -f
247254
```
248255

249256
## Deploying with Kubernetes

examples/docker-compose.host-mount.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/docker-compose.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
version: '3.4'
2-
31
services:
42
bds:
53
image: itzg/minecraft-bedrock-server
64
environment:
75
EULA: "TRUE"
8-
GAMEMODE: survival
9-
DIFFICULTY: normal
106
ports:
117
- "19132:19132/udp"
128
volumes:
13-
- bds:/data
9+
- ./data:/data
1410
stdin_open: true
1511
tty: true
16-
17-
volumes:
18-
bds: {}

0 commit comments

Comments
 (0)