From 694149c89089c4d720d6fc69cb1ef07a22562d2a Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 10 May 2024 18:47:19 -0500 Subject: [PATCH] docs: use host directory for data volume in default example (#414) --- .github/workflows/ci.yml | 2 ++ README.md | 29 ++++++++++++++++---------- examples/docker-compose.host-mount.yml | 18 ---------------- examples/docker-compose.yml | 9 +------- 4 files changed, 21 insertions(+), 37 deletions(-) delete mode 100644 examples/docker-compose.host-mount.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bc56b1..1dcc257 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,8 @@ on: - "[0-9]+.[0-9]+.[0-9]+" paths-ignore: - README.md + - "examples/**" + - "docs/**" pull_request: branches: - master diff --git a/README.md b/README.md index 6d6de4b..2af492a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/examples/docker-compose.host-mount.yml b/examples/docker-compose.host-mount.yml deleted file mode 100644 index c8fc552..0000000 --- a/examples/docker-compose.host-mount.yml +++ /dev/null @@ -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 diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index c9eee67..c647b71 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -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: {}