From d865aef53e77b818ed2b86162385643759e74e35 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 6 Apr 2026 19:03:52 +0100 Subject: [PATCH] Update Docker workflow to upload docker instructions to release --- .github/docker-release-template.md | 11 +++++++++++ .github/workflows/docker.yml | 9 ++++++++- README.md | 21 --------------------- 3 files changed, 19 insertions(+), 22 deletions(-) create mode 100644 .github/docker-release-template.md diff --git a/.github/docker-release-template.md b/.github/docker-release-template.md new file mode 100644 index 00000000..d22b45df --- /dev/null +++ b/.github/docker-release-template.md @@ -0,0 +1,11 @@ +# MapSync Docker Server + +## Running a server + +1. [Install the Docker Engine](https://docs.docker.com/engine/install/), if you haven't already. + +2. [Install Docker Compose](https://docs.docker.com/compose/install/) (We're using Docker Compose V2, so update if you haven't already done so.) + +3. Create a folder for MapSync (eg: `MapSync`) and cd into it. + +4. Start the Docker server: `docker pull ghcr.io/DOCKER_IMAGE_REF` diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 770b8307..84cf6b8c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest permissions: packages: write - contents: read + contents: write steps: - name: Check out the repo uses: actions/checkout@v6 @@ -59,3 +59,10 @@ jobs: platforms: linux/amd64,linux/arm64 cache-from: type=gha cache-to: type=gha,mode=max + + - name: Upload Docker instructions to release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + sed 's|DOCKER_IMAGE_REF|${{ github.repository }}@${{ steps.build-and-push.outputs.digest }}|' .github/docker-release-template.md > "MapSync-${{ github.event.release.tag_name }}-server-docker.md" + gh release upload "${{ github.event.release.tag_name }}" "MapSync-${{ github.event.release.tag_name }}-server-docker.md" diff --git a/README.md b/README.md index 43a9716a..d365d9ec 100644 --- a/README.md +++ b/README.md @@ -22,26 +22,6 @@ Map-Sync tracks a timestamp per chunk, so old data will never overwrite newer da ## Running a server -
-Docker Install (recommended) -
- -1. [Install the Docker Engine](https://docs.docker.com/engine/install/), if you haven't already. -2. [Install Docker Compose](https://docs.docker.com/compose/install/) (We're using Docker Compose V2, so update if you haven't already done so.) -3. Open a terminal. -4. Clone our code. - - `git clone https://github.com/CivPlatform/map-sync.git` -5. Change your working directory. - - `cd map-sync/` -6. To run the server with interactive prompt: - - `docker compose run --rm -it -p 12312:12312 map-sync` - - To stop the interactive prompt: hit ctrl-c twice -7. To run the server headless: - - `docker compose up map-sync -d` - - To stop the headless server: `docker compose down map-sync` - -
- By default, a whitelist will deny any connections, which can be turned off from the config file. (**Caution**)\ You can also add and remove players via the commands below or via the config files @@ -54,7 +34,6 @@ You can also add and remove players via the commands below or via the config fil Client authentication can also be turned off for use with unauthenticated accounts. (ex. testing purposes) - ### Server commands Run these inside the command-line interface after starting the server.