docs: use host directory for data volume in default example (#414)

This commit is contained in:
Geoff Bourne authored and GitHub committed 2024-05-10 18:47:19 -05:00
1 parent 39a562fd38
commit 694149c890
4 files changed
+20 -36

No files matched your search

+2
View File
@@ -9,6 +9,8 @@ on:
- "[0-9]+.[0-9]+.[0-9]+"
paths-ignore:
- README.md
- "examples/**"
- "docs/**"
pull_request:
branches:
- master
+17 -10
View File
@@ -224,26 +224,33 @@ When finished, detach from the server console using Ctrl-p, Ctrl-q
## Deploying with Docker Compose
The [examples](examples) directory contains [an example Docker compose file](examples/docker-compose.yml) that declares:
- a service running the bedrock server container and exposing UDP port 19132
- a volume to be attached to the service
- 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
- a volume attached to the service at the container path `/data`
The service configuration includes some examples of configuring the server properties via environment variables:
```yaml
environment:
services:
bds:
image: itzg/minecraft-bedrock-server
environment:
EULA: "TRUE"
GAMEMODE: survival
DIFFICULTY: normal
ports:
- "19132:19132/udp"
volumes:
- ./data:/data
stdin_open: true
tty: true
```
From with in the `examples` directory, you can deploy the composition by using:
Start the server and run in the background using:
```bash
docker-compose up -d
docker compose up -d
```
You can follow the logs using:
You can follow the logs at any time using:
```bash
docker-compose logs -f bds
docker compose logs -f
```
## Deploying with Kubernetes
-18
View File
@@ -1,18 +0,0 @@
# This example uses a host mounted directory that is created/used relative to this
# location of this compose file.
version: '3.4'
services:
bds:
image: itzg/minecraft-bedrock-server
environment:
EULA: "TRUE"
GAMEMODE: survival
DIFFICULTY: normal
ports:
- 19132:19132/udp
volumes:
- ./data:/data
stdin_open: true
tty: true
+1 -8
View File
@@ -1,18 +1,11 @@
version: '3.4'
services:
bds:
image: itzg/minecraft-bedrock-server
environment:
EULA: "TRUE"
GAMEMODE: survival
DIFFICULTY: normal
ports:
- "19132:19132/udp"
volumes:
- bds:/data
- ./data:/data
stdin_open: true
tty: true
volumes:
bds: {}