diff --git a/.github/docker-release-template.md b/.github/docker-release-template.md new file mode 100644 index 0000000..d22b45d --- /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 770b830..84cf6b8 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 43a9716..d365d9e 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.