Skip to content

Commit

Permalink
docs: use host directory for data volume in default example (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored May 10, 2024
1 parent 39a562f commit 694149c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- "[0-9]+.[0-9]+.[0-9]+"
paths-ignore:
- README.md
- "examples/**"
- "docs/**"
pull_request:
branches:
- master
Expand Down
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
EULA: "TRUE"
GAMEMODE: survival
DIFFICULTY: normal
services:
bds:
image: itzg/minecraft-bedrock-server
environment:
EULA: "TRUE"
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
Expand Down
18 changes: 0 additions & 18 deletions examples/docker-compose.host-mount.yml

This file was deleted.

9 changes: 1 addition & 8 deletions examples/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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: {}

0 comments on commit 694149c

Please sign in to comment.