diff --git a/README.md b/README.md index 2ff4c36c..31aa7ecf 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Enabling Autopause](#enabling-autopause) * [Running on RaspberryPi](#running-on-raspberrypi) - + @@ -212,7 +212,7 @@ When attached in this way you can stop the server, edit the configuration under With Docker Compose, setting up a host attached directory is even easier since relative paths can be configured. For example, with the following `docker-compose.yml` Docker will automatically create/attach the relative directory `minecraft-data` to the container. ```yaml -version: "3.8" +version: "3" services: mc: @@ -221,6 +221,9 @@ services: - 25565:25565 environment: EULA: "TRUE" + tty: true + stdin_open: true + restart: unless-stopped volumes: # attach a directory relative to the directory containing this compose file - ./minecraft-data:/data @@ -343,20 +346,18 @@ every time you want to create new Minecraft server, you can now use `docker-compose.yml` file like the following: ```yml -version: "3.8" +version: "3" -minecraft-server: - image: itzg/minecraft-server - - ports: - - "25565:25565" - - environment: - EULA: "TRUE" - - tty: true - stdin_open: true - restart: always +services: + mc: + image: itzg/minecraft-server + ports: + - 25565:25565 + environment: + EULA: "TRUE" + tty: true + stdin_open: true + restart: unless-stopped ``` and in the same directory as that file run diff --git a/examples/docker-compose-spiget.yml b/examples/docker-compose-spiget.yml new file mode 100644 index 00000000..0806dbf1 --- /dev/null +++ b/examples/docker-compose-spiget.yml @@ -0,0 +1,17 @@ +version: "3" + +services: + mc: + # Only using IMAGE variable to allow for local testing + image: ${IMAGE:-itzg/minecraft-server} + ports: + - 25565:25565 + environment: + EULA: "TRUE" + TYPE: SPIGOT + SPIGET_RESOURCES: 9089,34315,3836 + volumes: + - data:/data + +volumes: + data: {} diff --git a/start-deployAirplane b/start-deployAirplane index 89deac44..8b40169a 100644 --- a/start-deployAirplane +++ b/start-deployAirplane @@ -32,7 +32,7 @@ log "Using Airplane-${AIRPLANE_BRANCH} branch" export SERVER=airplane-${AIRPLANE_BRANCH}-${AIRPLANE_BUILD}.jar -if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then +if [ ! -f "$SERVER" ] || isTrue "${FORCE_REDOWNLOAD:-false}"; then downloadUrl="https://ci.tivy.ca/job/Airplane-${AIRPLANE_BRANCH}/${AIRPLANE_BUILD}/artifact/launcher-airplane.jar" log "Downloading Airplane from $downloadUrl ..." curl -fsSL -o "$SERVER" "$downloadUrl" diff --git a/start-deployPurpur b/start-deployPurpur index ba30e929..37ea2567 100755 --- a/start-deployPurpur +++ b/start-deployPurpur @@ -10,7 +10,7 @@ isDebugging && set -x : ${FORCE_REDOWNLOAD:=false} if [[ ${PURPUR_BUILD} == LATEST ]]; then - PURPUR_BUILD=$(curl -fsSL "https://purpur.pl3x.net/api/v1/purpur/${VANILLA_VERSION}" | + PURPUR_BUILD=$(curl -fsSL "https://api.pl3x.net/v2/purpur/${VANILLA_VERSION}" | jq -r '.builds.latest' || echo "") if [[ -z ${PURPUR_BUILD} ]]; then log "ERROR: Failed to locate a Purpur build for ${VANILLA_VERSION}." @@ -22,7 +22,7 @@ fi export SERVER="purpur-${VANILLA_VERSION}-${PURPUR_BUILD}.jar" if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then - downloadUrl="https://purpur.pl3x.net/api/v1/purpur/${VANILLA_VERSION}/${PURPUR_BUILD}/download" + downloadUrl="https://api.pl3x.net/v2/purpur/${VANILLA_VERSION}/${PURPUR_BUILD}/download" log "Downloading Purpur from $downloadUrl ..." if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then log "ERROR: failed to download from $downloadUrl (status=$?)" diff --git a/start-spiget b/start-spiget index 92e0fac7..6773d800 100644 --- a/start-spiget +++ b/start-spiget @@ -29,7 +29,7 @@ getResourceFromSpiget() { mkdir -p /data/plugins if [ -f /data/plugins/.${resource} ]; then - log "Resource '${$resource}' already downloaded" + log "Resource '${resource}' already downloaded" else tmpfile="/tmp/${resource}.zip" url="https://api.spiget.org/v2/resources/${resource}/download"