docs: use host directory for data volume in default example (#414)
This commit is contained in:
1 parent
39a562fd38
commit
694149c890
4 files changed
+19
-35
No files matched your search
@@ -9,6 +9,8 @@ on:
|
|||||||
- "[0-9]+.[0-9]+.[0-9]+"
|
- "[0-9]+.[0-9]+.[0-9]+"
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- README.md
|
- README.md
|
||||||
|
- "examples/**"
|
||||||
|
- "docs/**"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
@@ -224,26 +224,33 @@ When finished, detach from the server console using Ctrl-p, Ctrl-q
|
|||||||
## Deploying with Docker Compose
|
## Deploying with Docker Compose
|
||||||
|
|
||||||
The [examples](examples) directory contains [an example Docker compose file](examples/docker-compose.yml) that declares:
|
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 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 to be attached to the service
|
- 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
|
```yaml
|
||||||
|
services:
|
||||||
|
bds:
|
||||||
|
image: itzg/minecraft-bedrock-server
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
GAMEMODE: survival
|
ports:
|
||||||
DIFFICULTY: normal
|
- "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
|
```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
|
```bash
|
||||||
docker-compose logs -f bds
|
docker compose logs -f
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deploying with Kubernetes
|
## Deploying with Kubernetes
|
||||||
|
|||||||
@@ -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,18 +1,11 @@
|
|||||||
version: '3.4'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
bds:
|
bds:
|
||||||
image: itzg/minecraft-bedrock-server
|
image: itzg/minecraft-bedrock-server
|
||||||
environment:
|
environment:
|
||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
GAMEMODE: survival
|
|
||||||
DIFFICULTY: normal
|
|
||||||
ports:
|
ports:
|
||||||
- "19132:19132/udp"
|
- "19132:19132/udp"
|
||||||
volumes:
|
volumes:
|
||||||
- bds:/data
|
- ./data:/data
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
|
|
||||||
volumes:
|
|
||||||
bds: {}
|
|
||||||
Reference in new issue
Block a user