Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/docker-release-template.md
Original file line number Diff line number Diff line change
@@ -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`
9 changes: 8 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
21 changes: 0 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,6 @@ Map-Sync tracks a timestamp per chunk, so old data will never overwrite newer da

## Running a server

<details open>
<summary>Docker Install (recommended)</summary>
<br />

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`

</details>

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

Expand All @@ -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.
Expand Down