mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-17 23:16:24 +00:00
Compare commits
41 Commits
2022.16.0
...
2021.14.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ebcc0ef48 | ||
|
|
57720cf394 | ||
|
|
64b2783f19 | ||
|
|
1dbdd7628a | ||
|
|
4252ec710f | ||
|
|
11d455c284 | ||
|
|
08bc419dc8 | ||
|
|
67c23017d0 | ||
|
|
6e1ba3667c | ||
|
|
0c2f8b903b | ||
|
|
b9335d9cd6 | ||
|
|
0d92092b90 | ||
|
|
e653a41b3f | ||
|
|
82e63c54c4 | ||
|
|
f9c573f598 | ||
|
|
bf8b9cf20d | ||
|
|
0dd5a412d9 | ||
|
|
b389561091 | ||
|
|
6ee055761d | ||
|
|
49f9ff645e | ||
|
|
004cbdb9f7 | ||
|
|
45856a1a81 | ||
|
|
1e615e76e8 | ||
|
|
1c85a685de | ||
|
|
7cd207f40b | ||
|
|
140a8aa90c | ||
|
|
76dcff9d18 | ||
|
|
a9a86d249b | ||
|
|
595760d301 | ||
|
|
6d3f194ce3 | ||
|
|
21c1620f0c | ||
|
|
e78e5af96d | ||
|
|
0fb9700fc7 | ||
|
|
18925ef32c | ||
|
|
f06b990f8a | ||
|
|
75844ae81a | ||
|
|
6bb2323c46 | ||
|
|
7814ca21b5 | ||
|
|
b8806629ec | ||
|
|
4a7f838a0f | ||
|
|
2d07dee4df |
19
.gitattributes
vendored
19
.gitattributes
vendored
@@ -1,2 +1,17 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=lf
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
|
||||
# Standard to msysgit
|
||||
*.doc diff=astextplain
|
||||
*.DOC diff=astextplain
|
||||
*.docx diff=astextplain
|
||||
*.DOCX diff=astextplain
|
||||
*.dot diff=astextplain
|
||||
*.DOT diff=astextplain
|
||||
*.pdf diff=astextplain
|
||||
*.PDF diff=astextplain
|
||||
*.rtf diff=astextplain
|
||||
*.RTF diff=astextplain
|
||||
|
||||
4
.github/FUNDING.yml
vendored
4
.github/FUNDING.yml
vendored
@@ -1,4 +0,0 @@
|
||||
github: itzg
|
||||
custom:
|
||||
- https://www.buymeacoffee.com/itzg
|
||||
- https://paypal.me/itzg
|
||||
40
.github/ISSUE_TEMPLATE/bug.yml
vendored
40
.github/ISSUE_TEMPLATE/bug.yml
vendored
@@ -1,40 +0,0 @@
|
||||
name: Bug Report
|
||||
description: File a bug report
|
||||
labels:
|
||||
- bug
|
||||
- status/needs triage
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to report a bug.
|
||||
|
||||
Please double check some things first:
|
||||
- Do you just have a question about something? If so, asking in the [Q&A Discussions](https://github.com/itzg/docker-minecraft-server/discussions/categories/q-a) or asking on [the Discord server](https://discord.gg/DXfKpjB) would be best.
|
||||
- Is this bug happening after the `[init]` prefixed logs and after the log that says "Starting the Minecraft server"? If so, please report the bug with Mojang or the respective server provider.
|
||||
- Are you seeing a performance problem? If so, that is typically outside the scope of the image setup mechanims. Ask a question as above or contact the respective server provider.
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Describe the problem
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: container
|
||||
attributes:
|
||||
label: Container definition
|
||||
description: Please provide the compose file or run command used to create the container
|
||||
value: |
|
||||
```
|
||||
Paste run command or compose file here
|
||||
```
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Container logs
|
||||
description: |
|
||||
Please provide container logs from the start of the container, which will be the ones prefixed with `[init]`. It is even better if you can set the variable `DEBUG` to "true" and provide those debug container logs.
|
||||
value: |
|
||||
```
|
||||
Paste logs here
|
||||
```
|
||||
7
.github/ISSUE_TEMPLATE/config.yml
vendored
7
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,7 +0,0 @@
|
||||
contact_links:
|
||||
- name: Ask a question in discussions
|
||||
url: https://github.com/itzg/docker-minecraft-server/discussions
|
||||
about: Please ask questions here
|
||||
- name: Ask a question on Discord
|
||||
url: https://discord.gg/DXfKpjB
|
||||
about: Please ask questions here
|
||||
29
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
29
.github/ISSUE_TEMPLATE/enhancement.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: Enhancement Request
|
||||
description: Request an enhancement
|
||||
labels:
|
||||
- enhancement
|
||||
- status/needs triage
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to request an enhancement.
|
||||
|
||||
Even if you plan on submitting a pull request with a contributed enhancement it is best to describe the enhancement here first. Somebody might already be working on a similar thing and could use your help.
|
||||
- type: dropdown
|
||||
id: type
|
||||
attributes:
|
||||
label: Enhancement Type
|
||||
options:
|
||||
- Improve an existing feature
|
||||
- A completely new feature
|
||||
- New server type
|
||||
- Not sure
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Describe the enhancement
|
||||
validations:
|
||||
required: true
|
||||
6
.github/no-response.yml
vendored
Normal file
6
.github/no-response.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
daysUntilClose: 14
|
||||
responseRequiredLabel: "status/waiting on feedback"
|
||||
closeComment: >
|
||||
This issue has been automatically closed because there has been no response
|
||||
after requesting feedback. Please feel free to re-open this issue if the
|
||||
scenario still exists and provide a comment with more information.
|
||||
17
.github/release.yml
vendored
17
.github/release.yml
vendored
@@ -1,17 +0,0 @@
|
||||
changelog:
|
||||
exclude:
|
||||
authors:
|
||||
- dependabot
|
||||
categories:
|
||||
- title: Enhancements
|
||||
labels:
|
||||
- enhancement
|
||||
- title: Bug Fixes
|
||||
labels:
|
||||
- bug
|
||||
- title: Documentation
|
||||
labels:
|
||||
- documentation
|
||||
- title: Other Changes
|
||||
labels:
|
||||
- "*"
|
||||
184
.github/workflows/build-multiarch.yml
vendored
184
.github/workflows/build-multiarch.yml
vendored
@@ -1,176 +1,82 @@
|
||||
name: Test and Build multi-architecture
|
||||
name: Build and publish multiarch
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- test/**
|
||||
- "*-multiarch"
|
||||
- "multiarch*"
|
||||
- java8-openj9
|
||||
- java11*
|
||||
- java15*
|
||||
- java16*
|
||||
- test/multiarch/*
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-multiarch*"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-*multiarch"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java8-openj9"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java11*"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java15"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java16*"
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- java17
|
||||
- java17-graalvm-ce
|
||||
- java17-jdk
|
||||
- java17-openj9
|
||||
- java17-alpine
|
||||
- java8
|
||||
- java8-graalvm-ce
|
||||
- java8-multiarch
|
||||
- java8-openj9
|
||||
- java8-jdk
|
||||
- java11
|
||||
- java11-openj9
|
||||
- java11-jdk
|
||||
include:
|
||||
# JAVA 17:
|
||||
- variant: java17
|
||||
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
||||
baseImage: eclipse-temurin:17-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-graalvm-ce
|
||||
baseImage: ghcr.io/graalvm/graalvm-ce:ol8-java17
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-jdk
|
||||
baseImage: eclipse-temurin:17-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-17-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.18.2
|
||||
# JAVA 11:
|
||||
- variant: java11
|
||||
baseImage: adoptopenjdk:11-jre-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
- variant: java11-jdk
|
||||
baseImage: adoptopenjdk:11-jdk-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
- variant: java11-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-11-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||
- variant: java8
|
||||
baseImage: openjdk:8-jre-alpine3.9
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-graalvm-ce
|
||||
baseImage: ghcr.io/graalvm/graalvm-ce:java8
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-multiarch
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-jdk
|
||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
- variant: java8-openj9
|
||||
baseImage: ibm-semeru-runtimes:open-8u312-b07-jre
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
|
||||
docker-buildx:
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CACHE_NAME: master
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
|
||||
# then the use of ${{ github.repository_owner }} will need to be replaced.
|
||||
images: |
|
||||
${{ github.repository_owner }}/minecraft-server
|
||||
itzg/minecraft-server
|
||||
tags: |
|
||||
type=ref,event=tag,enable=${{ matrix.variant == 'java17' }}
|
||||
type=ref,event=tag,suffix=-${{ matrix.variant }}
|
||||
type=raw,value=${{ matrix.variant }}
|
||||
flavor: |
|
||||
latest=${{ matrix.variant == 'java17' }}
|
||||
labels: |
|
||||
org.opencontainers.image.authors=Geoff Bourne <itzgeoff@gmail.com>
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
type=edge,branch=master
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2.1.5
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ env.CACHE_NAME }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ env.CACHE_NAME }}-
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2.1.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
# load into daemon for test usage in next step
|
||||
load: true
|
||||
push: false
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ matrix.baseImage }}
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
# no cache-to to avoid cross-cache update from next build step
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
uses: docker/setup-qemu-action@v1.1.0
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
if: env.HAS_IMAGE_REPO_ACCESS
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
if: github.actor == github.repository_owner
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2.4.0
|
||||
with:
|
||||
platforms: ${{ matrix.platforms }}
|
||||
push: >
|
||||
${{
|
||||
github.ref_type == 'tag'
|
||||
|| github.ref_name == 'master'
|
||||
|| ( github.event_name == 'pull_request'
|
||||
&& env.HAS_IMAGE_REPO_ACCESS
|
||||
&& contains(github.event.pull_request.labels.*.name, 'ci/push-image')
|
||||
)
|
||||
}}
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ matrix.baseImage }}
|
||||
BUILD_FILES_REV=${{ steps.build-files-rev.outputs.REV }}
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
|
||||
26
.github/workflows/discord.yml
vendored
26
.github/workflows/discord.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: Discord notifications
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["ContinuousIntegration", "Build and Publish", "Build and publish multiarch" ]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
discord:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: on-success
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏"
|
||||
- name: on-failure
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥"
|
||||
20
.github/workflows/generate-toc.yml
vendored
Normal file
20
.github/workflows/generate-toc.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Generate README table of contents
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- README.md
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- run: |
|
||||
curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
|
||||
chmod a+x gh-md-toc
|
||||
./gh-md-toc --insert --no-backup README.md
|
||||
- uses: stefanzweifel/git-auto-commit-action@v4.11.0
|
||||
with:
|
||||
commit_message: "docs: Auto update markdown TOC"
|
||||
33
.github/workflows/issue-label.yml
vendored
33
.github/workflows/issue-label.yml
vendored
@@ -1,33 +0,0 @@
|
||||
name: Issue labels
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled, reopened, closed, deleted]
|
||||
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_ISSUES_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
labelNotify:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: notify on label
|
||||
if: >
|
||||
github.event.label.name == 'enhancement'
|
||||
|| github.event.label.name == 'bug'
|
||||
|| github.event.label.name == 'help wanted'
|
||||
|| github.event.label.name == 'priority/high'
|
||||
|| github.event.label.name == 'question'
|
||||
|| github.event.label.name == 'status/waiting on upstream'
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "[${{ github.event.issue.title }} (#${{ github.event.issue.number }})](<${{ github.event.issue.html_url }}>) added `${{ github.event.label.name }}` label"
|
||||
- name: notify on action change
|
||||
if: >
|
||||
github.event.action == 'closed'
|
||||
|| github.event.action == 'reopened'
|
||||
|| github.event.action == 'deleted'
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: "[${{ github.event.issue.title }} (#${{ github.event.issue.number }})](<${{ github.event.issue.html_url }}>) has been `${{ github.event.action }}` by `${{ github.event.sender.login }}`"
|
||||
97
.github/workflows/main.yml
vendored
Normal file
97
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
name: Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- java8
|
||||
- openj9
|
||||
- openj9-11
|
||||
- adopt11
|
||||
- test/*
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+-java8"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-11"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-openj9-nightly"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-adopt11"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
tests/test.sh
|
||||
build:
|
||||
needs:
|
||||
- test
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
CACHE_NAME: master
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Prepare
|
||||
id: prep
|
||||
run: |
|
||||
DOCKER_IMAGE=itzg/minecraft-server
|
||||
VERSION=edge
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
if [[ $GITHUB_REF == refs/heads/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/heads/}
|
||||
if [[ $VERSION == master ]]; then
|
||||
VERSION=latest
|
||||
fi
|
||||
fi
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION//\//-}"
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=cache_from::${TAGS}
|
||||
echo ::set-output name=version::${VERSION//\//-}
|
||||
echo ::set-output name=cache_version::${VERSION//\//-}
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2.1.5
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ env.CACHE_NAME }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-${{ env.CACHE_NAME }}-
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2.4.0
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
# publish
|
||||
push: true
|
||||
# tags determined by prep step
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
labels: |
|
||||
org.opencontainers.image.documentation=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
|
||||
org.opencontainers.image.source=https://github.com/itzg/docker-minecraft-server
|
||||
org.opencontainers.image.revision=${{ github.sha }}
|
||||
|
||||
- name: Image digest
|
||||
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||
16
.github/workflows/pr.yml
vendored
Normal file
16
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: Validate PR
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
tests/test.sh
|
||||
25
.github/workflows/stale-check.yml
vendored
25
.github/workflows/stale-check.yml
vendored
@@ -1,25 +0,0 @@
|
||||
name: Stale Check
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 2 * * *
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Process Stale Issues
|
||||
uses: actions/stale@v7
|
||||
with:
|
||||
stale-issue-label: status/stale
|
||||
stale-pr-label: status/stale
|
||||
stale-issue-message: >
|
||||
This issue is stale because it has been open 30 days with no activity.
|
||||
Please add a comment describing the reason to keep this issue open.
|
||||
days-before-stale: 30
|
||||
days-before-close: 5
|
||||
exempt-issue-labels: 'enhancement,keep,status/needs triage,priority/high'
|
||||
|
||||
69
.github/workflows/verify-pr.yml
vendored
69
.github/workflows/verify-pr.yml
vendored
@@ -1,69 +0,0 @@
|
||||
name: Verify PR
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
types: [assigned, opened, synchronize, labeled]
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
- "docs/**"
|
||||
- "examples/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
variant:
|
||||
- java17
|
||||
- java17-alpine
|
||||
- java8-multiarch
|
||||
include:
|
||||
# JAVA 17:
|
||||
- variant: java17
|
||||
# jammy doesn't work until minecraft updates to https://github.com/netty/netty/issues/12343
|
||||
baseImage: eclipse-temurin:17-jre-focal
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java17-alpine
|
||||
baseImage: eclipse-temurin:17-jre-alpine
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.18.2
|
||||
- variant: java8-multiarch
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# for build-files step
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
platforms: linux/amd64
|
||||
tags: ${{ env.IMAGE_TO_TEST }}
|
||||
# ensure latest base image is used
|
||||
pull: true
|
||||
# load into daemon for test usage in next step
|
||||
load: true
|
||||
push: false
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ matrix.baseImage }}
|
||||
cache-from: type=gha,scope=${{ matrix.variant }}
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
MINECRAFT_VERSION: ${{ matrix.mcVersion }}
|
||||
VARIANT: ${{ matrix.variant }}
|
||||
MODS_FORGEAPI_KEY: ${{ secrets.MODS_FORGEAPI_KEY }}
|
||||
DEBUG: ${{ runner.debug }}
|
||||
run: |
|
||||
tests/test.sh
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,6 +1,4 @@
|
||||
.vscode
|
||||
/data/
|
||||
/.idea/
|
||||
*.iml
|
||||
/gh-md-toc
|
||||
personal-build-and-develop.*
|
||||
/gh-md-toc
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
Adding a new server `TYPE` can vary due to the complexity of obtaining and configuring each type; however, the addition of any server type includes at least the following steps:
|
||||
|
||||
1. Copy an existing "start-deploy*" script, such as [start-deployMohist](scripts/start-deployMohist) and rename it accordingly making sure to retain the "start-deploy" prefix
|
||||
2. Modify the type-specific behavior between the "start-utils" preamble and the hand-off to `start-setupWorld` at the end of the script
|
||||
1. Copy an existing "start-deploy*" script, such as [start-deployMohist](start-deployMohist) and rename it accordingly making sure to retain the "start-deploy" prefix
|
||||
2. Modify the type-specific behavior between the "start-utils" preamble and the hand-off to `start-finalSetupWorld` at the end of the script
|
||||
3. Develop and test the changes using the [iterative process described below](#iterative-script-development)
|
||||
4. Add a case-entry to the `case "${TYPE^^}"` in [start-configuration](scripts/start-configuration)
|
||||
4. Add a case-entry to the `case "${TYPE^^}"` in [start-configuration](start-configuration)
|
||||
5. Add a section to the [README](README.md). It is recommended to copy-modify an existing section to retain a similar wording and level of detail
|
||||
6. [Submit a pull request](https://github.com/itzg/docker-minecraft-server/pulls)
|
||||
|
||||
@@ -15,35 +15,8 @@ Individual scripts can be iteratively developed, debugged, and tested using the
|
||||
|
||||
First, build a baseline of the image to include the packages needed by existing or new scripts:
|
||||
|
||||
PowerShell: (Example of building and testing ForgeAPI)
|
||||
```powershell
|
||||
$env:MODS_FORGEAPI_KEY='$2a$...'
|
||||
$env:FOLDER_TO_TEST="forgeapimods_projectids"
|
||||
$env:IMAGE_TO_TEST="mc-dev"
|
||||
docker build -t $env:IMAGE_TO_TEST .
|
||||
pushd "tests/setuponlytests/$env:FOLDER_TO_TEST/"
|
||||
docker-compose run mc
|
||||
docker-compose down -v --remove-orphans
|
||||
popd
|
||||
```
|
||||
|
||||
PowerShell: Building different images of Java for testing
|
||||
```powershell
|
||||
$env:BASE_IMAGE='eclipse-temurin:8u312-b07-jre'
|
||||
$env:IMAGE_TO_TEST="mc-dev"
|
||||
docker build --build-arg BASE_IMAGE=$env:BASE_IMAGE -t $env:IMAGE_TO_TEST .
|
||||
```
|
||||
|
||||
Bash: (Example of building and testing ForgeAPI)
|
||||
```bash
|
||||
export MODS_FORGEAPI_KEY='$2a$...'
|
||||
export FOLDER_TO_TEST="forgeapimods_file"
|
||||
export IMAGE_TO_TEST="mc-dev"
|
||||
docker build -t $IMAGE_TO_TEST .
|
||||
pushd tests/setuponlytests/$FOLDER_TO_TEST/
|
||||
docker-compose run mc
|
||||
docker-compose down -v --remove-orphans
|
||||
popd
|
||||
```shell script
|
||||
docker build -t mc-dev .
|
||||
```
|
||||
|
||||
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
|
||||
@@ -67,33 +40,35 @@ VANILLA_VERSION=1.12.2 /scripts/start-magma
|
||||
|
||||
> NOTE: You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing.
|
||||
|
||||
## Using development copy of mc-image-helper
|
||||
## Multi-base-image variants
|
||||
|
||||
In the cloned copy of [`mc-image-helper`](https://github.com/itzg/mc-image-helper), create an up-to-date snapshot build of the tgz distribution using:
|
||||
Several base-image variants are maintained in order to offer choices in JDK provider and version. The variants are maintained in their respective branches:
|
||||
- openj9
|
||||
- openj9-nightly
|
||||
- adopt11
|
||||
- adopt13
|
||||
- multiarch
|
||||
|
||||
```shell
|
||||
./gradlew distTar
|
||||
The [docker-versions-create.sh](docker-versions-create.sh) script is configured with the branches to maintain and is used to merge changes from the master branch into the mulit-base variant branches. The script also manages git tagging the master branch along with the merged branches. So a typical use of the script would be like:
|
||||
|
||||
```shell script
|
||||
./docker-versions-create.sh -s -t 1.2.0
|
||||
```
|
||||
|
||||
Assuming [http-server](https://www.npmjs.com/package/http-server) is installed globally, start a static web server using:
|
||||
> Most often the major version will be bumped unless a bug or hotfix needs to be published in which case the patch version should be incremented.
|
||||
|
||||
```shell
|
||||
http-server ./build/distributions -p 8080
|
||||
```
|
||||
> The build and publishing of those branches and their tags is currently performed within Docker Hub.
|
||||
|
||||
Note the port that was selected by http-server and pass the build arguments, such as:
|
||||
## multiarch support
|
||||
|
||||
```shell
|
||||
--build-arg MC_HELPER_VERSION=1.8.1-SNAPSHOT \
|
||||
--build-arg MC_HELPER_BASE_URL=http://host.docker.internal:8080
|
||||
```
|
||||
The [multiarch branch](https://github.com/itzg/docker-minecraft-server/tree/multiarch) supports running the image on amd64, arm64, and armv7 (aka RaspberryPi). Unlike the mainline branches, it is based on Ubuntu 18.04 since the openjdk package provided by Ubuntu includes full JIT support on all of the processor types.
|
||||
|
||||
Now the image can be built like normal, and it will install mc-image-helper from the locally built copy.
|
||||
The multiarch images are built and published by [a Github action](https://github.com/itzg/docker-minecraft-server/actions?query=workflow%3A%22Build+and+publish+multiarch%22), which [is configured in that branch](https://github.com/itzg/docker-minecraft-server/blob/multiarch/.github/workflows/build-multiarch.yml).
|
||||
|
||||
## Generating release notes
|
||||
|
||||
The following git command can be used to provide the bulk of release notes content:
|
||||
|
||||
```shell script
|
||||
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="* %s" 1.1.0..1.2.0
|
||||
git log --invert-grep --grep "^ci:" --grep "^misc:" --grep "^docs:" --pretty="- %s" 1.1.0..1.2.0
|
||||
```
|
||||
|
||||
160
Dockerfile
160
Dockerfile
@@ -1,72 +1,88 @@
|
||||
# syntax = docker/dockerfile:1.3
|
||||
|
||||
ARG BASE_IMAGE=eclipse-temurin:17-jre-focal
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
# CI system should set this to a hash or git revision of the build directory and it's contents to
|
||||
# ensure consistent cache updates.
|
||||
ARG BUILD_FILES_REV=1
|
||||
RUN --mount=target=/build,source=build \
|
||||
REV=${BUILD_FILES_REV} /build/run.sh install-packages
|
||||
|
||||
RUN --mount=target=/build,source=build \
|
||||
REV=${BUILD_FILES_REV} /build/run.sh setup-user
|
||||
|
||||
COPY --chmod=644 files/sudoers* /etc/sudoers.d
|
||||
|
||||
EXPOSE 25565 25575
|
||||
|
||||
# hook into docker BuildKit --platform support
|
||||
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
ARG EASY_ADD_VER=0.7.1
|
||||
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.2.0 --var app=restify --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.6.0 --var app=rcon-cli --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.11.0 --var app=mc-monitor --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.8.2 --var app=mc-server-runner --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
ARG MC_HELPER_VERSION=1.22.12
|
||||
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
||||
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||
| tar -C /usr/share -zxf - \
|
||||
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin
|
||||
|
||||
VOLUME ["/data"]
|
||||
WORKDIR /data
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
# End user MUST set EULA and change RCON_PASSWORD
|
||||
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 RCON_PASSWORD=minecraft
|
||||
|
||||
COPY --chmod=755 scripts/start* /
|
||||
COPY --chmod=755 bin/ /usr/local/bin/
|
||||
COPY --chmod=755 bin/mc-health /health.sh
|
||||
COPY --chmod=644 files/log4j2.xml /image/log4j2.xml
|
||||
COPY --chmod=755 files/auto /auto
|
||||
|
||||
RUN dos2unix /start* /auto/*
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=1m --interval=5s --retries=24 CMD mc-health
|
||||
FROM openjdk:8u212-jre-alpine
|
||||
|
||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||
|
||||
RUN apk add --no-cache -U \
|
||||
openssl \
|
||||
imagemagick \
|
||||
lsof \
|
||||
su-exec \
|
||||
shadow \
|
||||
bash \
|
||||
curl iputils wget \
|
||||
git \
|
||||
jq \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
sudo \
|
||||
knock \
|
||||
ttf-dejavu
|
||||
|
||||
RUN addgroup -g 1000 minecraft \
|
||||
&& adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft \
|
||||
&& mkdir -m 777 /data \
|
||||
&& chown minecraft:minecraft /data /home/minecraft
|
||||
|
||||
COPY files/sudoers* /etc/sudoers.d
|
||||
|
||||
EXPOSE 25565 25575
|
||||
|
||||
# hook into docker BuildKit --platform support
|
||||
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
|
||||
ARG TARGETOS=linux
|
||||
ARG TARGETARCH=amd64
|
||||
ARG TARGETVARIANT=""
|
||||
|
||||
ARG EASY_ADD_VER=0.7.1
|
||||
ADD https://github.com/itzg/easy-add/releases/download/${EASY_ADD_VER}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.2.0 --var app=restify --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.4.7 --var app=rcon-cli --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.7.1 --var app=mc-monitor --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=1.5.0 --var app=mc-server-runner --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
COPY mcstatus /usr/local/bin
|
||||
|
||||
VOLUME ["/data"]
|
||||
COPY server.properties /tmp/server.properties
|
||||
COPY log4j2.xml /tmp/log4j2.xml
|
||||
WORKDIR /data
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
ENV UID=1000 GID=1000 \
|
||||
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
||||
TYPE=VANILLA VERSION=LATEST \
|
||||
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
|
||||
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0
|
||||
|
||||
COPY start* /
|
||||
COPY health.sh /
|
||||
ADD files/autopause /autopause
|
||||
|
||||
RUN dos2unix /start* && chmod +x /start*
|
||||
RUN dos2unix /health.sh && chmod +x /health.sh
|
||||
RUN dos2unix /autopause/* && chmod +x /autopause/*.sh
|
||||
|
||||
ENTRYPOINT [ "/start" ]
|
||||
HEALTHCHECK --start-period=1m CMD /health.sh
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
. "/start-utils"
|
||||
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
|
||||
|
||||
if [ $# = 0 ]; then
|
||||
echo "ERROR: pass console commands as arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -p "${CONSOLE_IN_NAMED_PIPE}" ]; then
|
||||
echo "ERROR: named pipe ${CONSOLE_IN_NAMED_PIPE} is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" = 0 ]; then
|
||||
if [[ $(getDistro) == alpine ]]; then
|
||||
exec su-exec minecraft bash -c "echo $* > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||
else
|
||||
exec gosu minecraft bash -c "echo $* > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'"
|
||||
fi
|
||||
else
|
||||
echo "$@" >"${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"
|
||||
fi
|
||||
@@ -1,101 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${RCON_CMDS_STARTUP:=}"
|
||||
: "${RCON_CMDS_ON_CONNECT:=}"
|
||||
: "${RCON_CMDS_ON_DISCONNECT:=}"
|
||||
: "${RCON_CMDS_FIRST_CONNECT:=}"
|
||||
: "${RCON_CMDS_LAST_DISCONNECT:=}"
|
||||
: "${RCON_CMDS_PERIOD:=10}"
|
||||
|
||||
# needed for the clients connected function residing in autopause
|
||||
# shellcheck source=../auto/autopause-fcns.sh
|
||||
. /auto/autopause-fcns.sh
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
run_command(){
|
||||
rcon_cmd="$1"
|
||||
logRcon "running - $rcon_cmd"
|
||||
output=$(rcon-cli "$rcon_cmd")
|
||||
logRcon "$output"
|
||||
}
|
||||
|
||||
|
||||
# wait for java process to be started
|
||||
while :
|
||||
do
|
||||
if java_process_exists ; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
CLIENTCONNECTIONS=0
|
||||
STATE=INIT
|
||||
|
||||
while :
|
||||
do
|
||||
case X$STATE in
|
||||
XINIT)
|
||||
# Server startup
|
||||
if mc_server_listening ; then
|
||||
logRcon "MCServer is listening, running startup"
|
||||
if [[ "$RCON_CMDS_STARTUP" ]]; then
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_STARTUP"
|
||||
fi
|
||||
if
|
||||
[[ -z "$RCON_CMDS_ON_CONNECT" ]] &&
|
||||
[[ -z "$RCON_CMDS_ON_DISCONNECT" ]] &&
|
||||
[[ -z "$RCON_CMDS_FIRST_CONNECT" ]] &&
|
||||
[[ -z "$RCON_CMDS_LAST_DISCONNECT" ]]
|
||||
then
|
||||
logRcon "No addition rcon commands are given, stopping rcon cmd service"
|
||||
exit 0
|
||||
fi
|
||||
STATE=II
|
||||
fi
|
||||
;;
|
||||
XII)
|
||||
CURR_CLIENTCONNECTIONS=$(java_clients_connections)
|
||||
# First client connection
|
||||
# Setting priority run order: on first client connection is usually to STOP maintence, aka DO THIS FIRST
|
||||
if (( CURR_CLIENTCONNECTIONS > 0 )) && (( CLIENTCONNECTIONS == 0 )) && [[ "$RCON_CMDS_FIRST_CONNECT" ]]; then
|
||||
logRcon "First Clients has Connected, running first connect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_FIRST_CONNECT"
|
||||
fi
|
||||
|
||||
# When a client joins
|
||||
if (( CURR_CLIENTCONNECTIONS > CLIENTCONNECTIONS )) && [[ "$RCON_CMDS_ON_CONNECT" ]]; then
|
||||
logRcon "Clients have Connected, running connect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_ON_CONNECT"
|
||||
# When a client leaves
|
||||
elif (( CURR_CLIENTCONNECTIONS < CLIENTCONNECTIONS )) && [[ "$RCON_CMDS_ON_DISCONNECT" ]]; then
|
||||
logRcon "Clients have Disconnected, running disconnect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_ON_DISCONNECT"
|
||||
fi
|
||||
|
||||
# Last client connection
|
||||
# Setting priority run order: on last client connection is usually to START maintence, aka DO THIS LAST
|
||||
if (( CURR_CLIENTCONNECTIONS == 0 )) && (( CLIENTCONNECTIONS > 0 )) && [[ "$RCON_CMDS_LAST_DISCONNECT" ]]; then
|
||||
logRcon "ALL Clients have Disconnected, running last disconnect cmds"
|
||||
while read -r cmd; do
|
||||
run_command "$cmd"
|
||||
done <<< "$RCON_CMDS_LAST_DISCONNECT"
|
||||
fi
|
||||
CLIENTCONNECTIONS=$CURR_CLIENTCONNECTIONS
|
||||
;;
|
||||
*)
|
||||
logRcon "Error: invalid state: $STATE"
|
||||
;;
|
||||
esac
|
||||
sleep "$RCON_CMDS_PERIOD"
|
||||
done
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
apk add --no-cache -U \
|
||||
openssl \
|
||||
imagemagick \
|
||||
file \
|
||||
lsof \
|
||||
su-exec \
|
||||
coreutils \
|
||||
findutils \
|
||||
procps \
|
||||
shadow \
|
||||
bash \
|
||||
curl iputils \
|
||||
git \
|
||||
jq \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
sudo \
|
||||
knock \
|
||||
tar \
|
||||
zstd \
|
||||
nfs-utils
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
addgroup -g 1000 minecraft
|
||||
adduser -Ss /bin/false -u 1000 -G minecraft -h /home/minecraft minecraft
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $(uname -m) == "aarch64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64
|
||||
chmod +x /bin/gosu
|
||||
elif [[ $(uname -m) == "x86_64" ]]; then
|
||||
curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64
|
||||
chmod +x /bin/gosu
|
||||
else
|
||||
echo "Not supported!"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
microdnf install dnf -y
|
||||
|
||||
dnf install 'dnf-command(config-manager)' -y
|
||||
dnf config-manager --set-enabled ol8_codeready_builder
|
||||
tee /etc/yum.repos.d/ol8-epel.repo<<EOF
|
||||
[ol8_developer_EPEL]
|
||||
name= Oracle Linux \$releasever EPEL (\$basearch)
|
||||
baseurl=https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/\$basearch/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
|
||||
gpgcheck=1
|
||||
enabled=1
|
||||
EOF
|
||||
dnf update -y
|
||||
|
||||
dnf install -y ImageMagick \
|
||||
file \
|
||||
sudo \
|
||||
net-tools \
|
||||
iputils \
|
||||
curl \
|
||||
git \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql \
|
||||
procps-ng \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
unzip \
|
||||
zstd \
|
||||
lbzip2 \
|
||||
knock
|
||||
|
||||
bash /build/ol/install-gosu.sh
|
||||
@@ -1,2 +0,0 @@
|
||||
groupadd --gid 1000 minecraft
|
||||
useradd --system --shell /bin/false --uid 1000 -g minecraft --home /data minecraft
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
distro=$(cat /etc/os-release | grep -E "^ID=" | cut -d= -f2 | sed -e 's/"//g')
|
||||
|
||||
"$(dirname "$0")/${distro}/$1".sh
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
apt-get update
|
||||
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y \
|
||||
imagemagick \
|
||||
file \
|
||||
gosu \
|
||||
sudo \
|
||||
net-tools \
|
||||
iputils-ping \
|
||||
curl \
|
||||
git \
|
||||
jq \
|
||||
dos2unix \
|
||||
mysql-client \
|
||||
tzdata \
|
||||
rsync \
|
||||
nano \
|
||||
unzip \
|
||||
zstd \
|
||||
lbzip2 \
|
||||
knockd \
|
||||
nfs-common
|
||||
|
||||
apt-get clean
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
addgroup --gid 1000 minecraft
|
||||
adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||
@@ -1,16 +1,16 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- data:/data
|
||||
stdin_open: true
|
||||
tty: true
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
data: {}
|
||||
version: '3'
|
||||
# Other docker-compose examples in /examples
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
134
docker-versions-create.sh
Executable file
134
docker-versions-create.sh
Executable file
@@ -0,0 +1,134 @@
|
||||
#!/bin/bash
|
||||
#set -x
|
||||
# Use this variable to indicate a list of branches that docker hub is watching
|
||||
branches_list=(
|
||||
'java8'
|
||||
'java8-multiarch'
|
||||
'java8-openj9'
|
||||
'java11'
|
||||
'java11-openj9'
|
||||
'java15'
|
||||
'java16'
|
||||
'java16-openj9'
|
||||
'multiarch-latest'
|
||||
)
|
||||
|
||||
function TrapExit {
|
||||
echo "Checking out back in master"
|
||||
git checkout master
|
||||
}
|
||||
|
||||
batchMode=false
|
||||
|
||||
while getopts "hbt:s" arg
|
||||
do
|
||||
case $arg in
|
||||
b)
|
||||
batchMode=true
|
||||
;;
|
||||
t)
|
||||
tag=${OPTARG}
|
||||
;;
|
||||
s)
|
||||
tagArgs="-s -m 'Signed during docker-versions-create"
|
||||
;;
|
||||
h)
|
||||
echo "
|
||||
Usage $0 [options]
|
||||
|
||||
Options:
|
||||
-b enable batch mode, which avoids interactive prompts and causes script to fail immediately
|
||||
when any merge fails
|
||||
-t TAG tag and push the current revision on master with the given tag
|
||||
and apply respective tags to each branch
|
||||
-s enable signed tags
|
||||
-h display this help and exit
|
||||
"
|
||||
exit
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported arg $arg"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
${batchMode} && echo "Using batch mode"
|
||||
|
||||
trap TrapExit EXIT SIGTERM
|
||||
|
||||
test -d ./.git || { echo ".git folder was not found. Please start this script from root directory of the project!";
|
||||
exit 1; }
|
||||
|
||||
# Making sure we are in master
|
||||
git checkout master
|
||||
git pull --all || { echo "Can't pull the repo!"; \
|
||||
exit 1; }
|
||||
if [[ $tag ]]; then
|
||||
git tag $tag
|
||||
git push origin $tag
|
||||
fi
|
||||
|
||||
git_branches=$(git branch -a)
|
||||
|
||||
for branch in "${branches_list[@]}"; do
|
||||
if [[ "$git_branches" != *"$branch"* ]]; then
|
||||
echo "Can't update $branch because I can't find it in the list of branches."
|
||||
exit 1
|
||||
else
|
||||
echo "Branch $branch found. Working with it."
|
||||
git checkout "$branch" || { echo "Can't checkout into the branch. Don't know the cause."; \
|
||||
exit 1; }
|
||||
proceed='False'
|
||||
while [[ "$proceed" == "False" ]]; do
|
||||
# Ensure local branch is aligned with remote since docker-versions-create may have been run elsewhere
|
||||
git pull
|
||||
|
||||
if git merge -m 'Auto-merging via docker-versions-create' master; then
|
||||
proceed="True"
|
||||
echo "Branch $branch updated to current master successfully"
|
||||
# pushing changes to remote for this branch
|
||||
git commit -m "Auto merge branch with master" -a
|
||||
# push may fail if remote doesn't have this branch yet. In this case - sending branch
|
||||
git push || git push -u origin "$branch" || { echo "Can't push changes to the origin."; exit 1; }
|
||||
if [[ $tag ]]; then
|
||||
git tag "$tag-$branch"
|
||||
git push origin "$tag-$branch"
|
||||
fi
|
||||
elif ${batchMode}; then
|
||||
status=$?
|
||||
echo "Git merge failed in batch mode"
|
||||
exit ${status}
|
||||
# and trap exit gets us back to master
|
||||
else
|
||||
cat<<EOL
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
Master merge in the branch $branch encountered an error!
|
||||
You may try to fix the error and merge again. (Commit changes)
|
||||
Or skip this branch merge completely.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
EOL
|
||||
printf "Should we try again? (y):"
|
||||
read -r answer
|
||||
if [[ "$answer" == '' ]] || [[ "$answer" == 'y' ]] || [[ "$answer" == 'Y' ]]; then
|
||||
# If you use non-local editor or files are changed in repo
|
||||
cat <<EOL
|
||||
|
||||
The following commands may encounter an error!
|
||||
This is completely fine if the changes were made locally and remote branch doesn't know about them.
|
||||
|
||||
EOL
|
||||
# Updating branch from remote before trying again
|
||||
git checkout master
|
||||
git fetch --all
|
||||
git pull -a
|
||||
git checkout "$branch"
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
done
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 85 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 985 B |
2
examples/.gitignore
vendored
2
examples/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/data/
|
||||
modpacks/
|
||||
@@ -12,10 +12,7 @@ services:
|
||||
ENABLE_AUTOPAUSE: "TRUE"
|
||||
OVERRIDE_SERVER_PROPERTIES: "TRUE"
|
||||
MAX_TICK_TIME: "-1"
|
||||
# More aggressive settings for demo purposes
|
||||
AUTOPAUSE_TIMEOUT_INIT: "30"
|
||||
AUTOPAUSE_TIMEOUT_EST: "10"
|
||||
restart: unless-stopped
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
ENABLE_AUTOSTOP: "TRUE"
|
||||
# More aggressive settings for demo purposes
|
||||
AUTOSTOP_TIMEOUT_INIT: "30"
|
||||
AUTOSTOP_TIMEOUT_EST: "20"
|
||||
# Important not to auto-restart the server!!!
|
||||
restart: "no"
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
@@ -1,150 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# CURSEFORGE #
|
||||
# #
|
||||
# Date: 20221005 #
|
||||
# #
|
||||
# Mod: All The Mods 7 0.4.32 #
|
||||
# #
|
||||
# Notes: Verify that there is no EULA file in the modpack.zip #
|
||||
# if you do not delete it the EULA flag below will be #
|
||||
# overwritten when the modpack is copied. #
|
||||
# #
|
||||
####################################################################
|
||||
services:
|
||||
|
||||
####################################################################
|
||||
# Service Name #
|
||||
# #
|
||||
# Define Service Name here. If using RCON this name will be #
|
||||
# referenced again as RWA_RCON_HOST below. #
|
||||
# #
|
||||
# Example: 'name:' or 'mc_atm6:' #
|
||||
####################################################################
|
||||
mc_atm7:
|
||||
|
||||
####################################################################
|
||||
# Image & Container Name #
|
||||
# #
|
||||
# Specify Image Name and Java Version. The 'image' will always be #
|
||||
# 'itzg/minecraft-server' however the tag added to the end is #
|
||||
# where you can specify the java version or container architecture.#
|
||||
# See readme.md for a full list. #
|
||||
# #
|
||||
# 'container_name:' This can be anything you like. This is the name#
|
||||
# that will show when you run 'docker ps' commands. #
|
||||
####################################################################
|
||||
image: itzg/minecraft-server
|
||||
container_name: mc_atm7
|
||||
|
||||
####################################################################
|
||||
# Server Ports #
|
||||
# #
|
||||
# Specify external port. #
|
||||
####################################################################
|
||||
ports:
|
||||
- 25565:25565
|
||||
|
||||
####################################################################
|
||||
# Automatic Server Restart #
|
||||
# #
|
||||
# Define a restart policy here. #
|
||||
# - 'no' = Do not restart. #
|
||||
# - 'on-failure' = Restart if container exits because an error. #
|
||||
# - 'always' = Regardless of stop reason. #
|
||||
# - 'unless-stopped' = Similar to always except if stopped. #
|
||||
####################################################################
|
||||
restart: unless-stopped
|
||||
|
||||
####################################################################
|
||||
# Volume and Folder Access #
|
||||
# #
|
||||
# This section defines what folders and volumes you want to give #
|
||||
# this container access to. It is recommended to leaves these set #
|
||||
# to the default values unless you know what you are doing. #
|
||||
# #
|
||||
# Place your mod zip file in a folder called 'modpacks' in the #
|
||||
# same directory you place this docker-compose file. #
|
||||
# #
|
||||
# Specify the data volume name or directory here as well. #
|
||||
# In this example the volume name is 'data'. When docker creates #
|
||||
# the volume it will add what ever name you give it here to the #
|
||||
# end of the container name specified above. In this example it #
|
||||
# would be named 'mc_atm6_data'. If you change this be sure to #
|
||||
# update the volume name at the bottom of this config. #
|
||||
####################################################################
|
||||
volumes:
|
||||
- ./modpacks:/modpacks:ro
|
||||
- data:/data
|
||||
|
||||
####################################################################
|
||||
# EULA #
|
||||
# #
|
||||
# Accept EULA by setting to "true" #
|
||||
####################################################################
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
####################################################################
|
||||
# CURSEFORGE INSTALL #
|
||||
# #
|
||||
# Sets install type to FORGE and specifys the zip folder name #
|
||||
# and location of your mod pack. #
|
||||
# #
|
||||
# TYPE: Defines the install type as CURSEFORGE #
|
||||
# #
|
||||
# CF_SERVER_MOD: Define where the modpack.zip is located. #
|
||||
# #
|
||||
# Place your mod zip file in a folder called 'modpacks' in the #
|
||||
# same directory you place this docker-compose file. #
|
||||
####################################################################
|
||||
TYPE: CURSEFORGE
|
||||
CF_SERVER_MOD: /modpacks/ATM7-0.4.32-server.zip
|
||||
|
||||
####################################################################
|
||||
# Server Memory #
|
||||
# #
|
||||
# Set Maximum amount of memory allowed for your server. #
|
||||
####################################################################
|
||||
MEMORY: "8G"
|
||||
|
||||
####################################################################
|
||||
# Logging Options #
|
||||
# #
|
||||
# Set to "true" to delete old logs #
|
||||
####################################################################
|
||||
ENABLE_ROLLING_LOGS: "true"
|
||||
|
||||
####################################################################
|
||||
# Server Timezone #
|
||||
# #
|
||||
# Specify server Timezone #
|
||||
####################################################################
|
||||
TZ: "America/New_York"
|
||||
|
||||
####################################################################
|
||||
# Minecraft Game Options #
|
||||
# #
|
||||
# List any game options you want to define here. A full list can #
|
||||
# be found on the readme.md page on github. #
|
||||
####################################################################
|
||||
OVERRIDE_SERVER_PROPERTIES: "true"
|
||||
DIFFICULTY: "easy"
|
||||
MAX_TICK_TIME: "-1"
|
||||
ALLOW_FLIGHT: "true"
|
||||
OPS: ""
|
||||
VIEW_DISTANCE: 10
|
||||
MAX_PLAYERS: 10
|
||||
PVP: "false"
|
||||
LEVEL_TYPE: "biomesoplenty"
|
||||
MOTD: "Welcome Home"
|
||||
|
||||
####################################################################
|
||||
# Volumes #
|
||||
# #
|
||||
# Define data volume name here. You should leave this set to the #
|
||||
# default. #
|
||||
####################################################################
|
||||
volumes:
|
||||
data:
|
||||
@@ -2,20 +2,12 @@ version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-java8}
|
||||
image: itzg/minecraft-server:java8
|
||||
volumes:
|
||||
- ./modpacks:/modpacks:ro
|
||||
- data:/data
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: CURSEFORGE
|
||||
CF_SERVER_MOD: /modpacks/SIMPLE-SERVER-FILES-0.3.20.zip
|
||||
# CF_SERVER_MOD: /modpacks/createlive3serverfiles+1.4.2.zip
|
||||
# CF_SERVER_MOD: /modpacks/Valhelsia+3-3.5.1-SERVER.zip
|
||||
# CF_SERVER_MOD: https://media.forgecdn.net/files/3012/800/SkyFactory-4_Server_4.2.2.zip
|
||||
# CF_SERVER_MOD: /modpacks/${MODPACK:-SkyFactory_4_Server_4.1.0.zip}
|
||||
CF_SERVER_MOD: /modpacks/SkyFactory_4_Server_4.1.0.zip
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
- 25565:25565
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: ${IMAGE:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FABRIC
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- fabric:/data
|
||||
|
||||
volumes:
|
||||
fabric: {}
|
||||
@@ -1,161 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# FORGE_GENERIC_PACK #
|
||||
# #
|
||||
# Date: 20221005 #
|
||||
# #
|
||||
# Mod: Better Minecraft Plus v40 #
|
||||
# #
|
||||
# Game Version: 1.16.5 #
|
||||
# #
|
||||
# Notes: Verify that there is no EULA file in the modpack.zip #
|
||||
# if you do not delete it the EULA flag below will be #
|
||||
# overwritten when the modpack is copied. #
|
||||
# #
|
||||
####################################################################
|
||||
services:
|
||||
|
||||
####################################################################
|
||||
# Service Name #
|
||||
# #
|
||||
# Define Service Name here. If using RCON this name will be #
|
||||
# referenced again as RWA_RCON_HOST below. #
|
||||
# #
|
||||
# Example: 'name:' or 'mc_atm6:' #
|
||||
####################################################################
|
||||
mc_bmp:
|
||||
|
||||
####################################################################
|
||||
# Image & Container Name #
|
||||
# #
|
||||
# Specify Image Name and Java Version. The 'image' will always be #
|
||||
# 'itzg/minecraft-server' however the tag added to the end is #
|
||||
# where you can specify the java version or container architecture.#
|
||||
# See readme.md for a full list. #
|
||||
# #
|
||||
# 'container_name:' This can be anything you like. This is the name#
|
||||
# that will show when you run 'docker ps' commands. #
|
||||
####################################################################
|
||||
image: itzg/minecraft-server:java8
|
||||
container_name: mc_bmp
|
||||
|
||||
####################################################################
|
||||
# Server Ports #
|
||||
# #
|
||||
# Specify external port. #
|
||||
####################################################################
|
||||
ports:
|
||||
- 25565:25565
|
||||
|
||||
####################################################################
|
||||
# Automatic Server Restart #
|
||||
# #
|
||||
# Define a restart policy here. #
|
||||
# - 'no' = Do not restart. #
|
||||
# - 'on-failure' = Restart if container exits because an error. #
|
||||
# - 'always' = Regardless of stop reason. #
|
||||
# - 'unless-stopped' = Similar to always except if stopped. #
|
||||
####################################################################
|
||||
restart: unless-stopped
|
||||
|
||||
####################################################################
|
||||
# Volume and Folder Access #
|
||||
# #
|
||||
# This section defines what folders and volumes you want to give #
|
||||
# this container access to. It is recommended to leaves these set #
|
||||
# to the default values unless you know what you are doing. #
|
||||
# #
|
||||
# Place your mod zip file in a folder called 'modpacks' in the #
|
||||
# same directory you place this docker-compose file. #
|
||||
# #
|
||||
# Specify the data volume name or directory here as well. #
|
||||
# In this example the volume name is 'data'. When docker creates #
|
||||
# the volume it will add what ever name you give it here to the #
|
||||
# end of the container name specified above. In this example it #
|
||||
# would be named 'mc_atm6_data'. If you change this be sure to #
|
||||
# update the volume name at the bottom of this config. #
|
||||
####################################################################
|
||||
volumes:
|
||||
- ./modpacks:/modpacks:ro
|
||||
- data:/data
|
||||
|
||||
####################################################################
|
||||
# EULA #
|
||||
# #
|
||||
# Accept EULA by setting to "true" #
|
||||
####################################################################
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
####################################################################
|
||||
# FORGE INSTALL #
|
||||
# #
|
||||
# Sets install type to FORGE and specifys the zip folder name #
|
||||
# and location of your mod pack. #
|
||||
# #
|
||||
# TYPE: Defines the install type as FORGE #
|
||||
# #
|
||||
# VERSION: Defines the version of MC the modpack is based on. #
|
||||
# #
|
||||
# FORGE_VERSION: Defines the version of FORGE the modpack uses. #
|
||||
# This can usually be found in the modpack.zip as #
|
||||
# installer.jar #
|
||||
# #
|
||||
# GENERIC_PACK: Define where the modpack.zip is located. #
|
||||
# #
|
||||
# Place your mod zip file in a folder called 'modpacks' in the #
|
||||
# same directory you place this docker-compose file. #
|
||||
####################################################################
|
||||
TYPE: FORGE
|
||||
VERSION: 1.16.5
|
||||
FORGE_VERSION: 36.2.39
|
||||
GENERIC_PACK: /modpacks/Better+MC+Server+Pack+PLUS+1.16.5+v40+HF.zip
|
||||
|
||||
####################################################################
|
||||
# Server Memory #
|
||||
# #
|
||||
# Set Maximum amount of memory allowed for your server. #
|
||||
####################################################################
|
||||
MEMORY: "8G"
|
||||
|
||||
####################################################################
|
||||
# Logging Options #
|
||||
# #
|
||||
# Set to "true" to delete old logs #
|
||||
####################################################################
|
||||
ENABLE_ROLLING_LOGS: "true"
|
||||
|
||||
####################################################################
|
||||
# Server Timezone #
|
||||
# #
|
||||
# Specify server Timezone #
|
||||
####################################################################
|
||||
TZ: "America/New_York"
|
||||
|
||||
####################################################################
|
||||
# Minecraft Game Options #
|
||||
# #
|
||||
# List any game options you want to define here. A full list can #
|
||||
# be found on the readme.md page on github. #
|
||||
####################################################################
|
||||
OVERRIDE_SERVER_PROPERTIES: "true"
|
||||
DIFFICULTY: "easy"
|
||||
MAX_TICK_TIME: "-1"
|
||||
VIEW_DISTANCE: "6"
|
||||
ALLOW_FLIGHT: "true"
|
||||
OPS: ""
|
||||
VIEW_DISTANCE: 10
|
||||
MAX_PLAYERS: 10
|
||||
PVP: "false"
|
||||
LEVEL_TYPE: "biomesoplenty"
|
||||
MOTD: "Welcome Home"
|
||||
|
||||
####################################################################
|
||||
# Volumes #
|
||||
# #
|
||||
# Define data volume name here. You should leave this set to the #
|
||||
# default. #
|
||||
####################################################################
|
||||
volumes:
|
||||
data:
|
||||
@@ -2,16 +2,15 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
image: itzg/minecraft-server:java8
|
||||
ports:
|
||||
# expose the Minecraft server port outside of container
|
||||
- "25565:25565"
|
||||
- 25565:25565
|
||||
environment:
|
||||
# REQUIRED for all types
|
||||
EULA: "TRUE"
|
||||
# Set server type (vs the default of vanilla)
|
||||
TYPE: FORGE
|
||||
DEBUG: "true"
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- mc_forge:/data
|
||||
|
||||
@@ -3,7 +3,7 @@ version: "3.8"
|
||||
services:
|
||||
mc:
|
||||
# FTBA support is only available in non-Alpine images
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-java8-multiarch}
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
ports:
|
||||
# expose the Minecraft server port outside of container
|
||||
- 25565:25565
|
||||
@@ -14,11 +14,10 @@ services:
|
||||
TYPE: FTBA
|
||||
# Use Pack ID from https://ftb.neptunepowered.org/pack/ftb-presents-direwolf20-1-12/
|
||||
FTB_MODPACK_ID: "31"
|
||||
FTB_MODPACK_VERSION_ID: ""
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- ftba:/data
|
||||
- mc_ftb:/data
|
||||
|
||||
volumes:
|
||||
# declared the named volume, but use default/local storage engine
|
||||
ftba: {}
|
||||
mc_ftb: {}
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
####################################################################
|
||||
# FORGE GENERIC_PACK #
|
||||
# #
|
||||
# Date: 20220828 #
|
||||
# #
|
||||
# Mod: TNP Limitless 5 v2.19.0 #
|
||||
# #
|
||||
# Notes: Verify that there is no EULA file in the modpack.zip #
|
||||
# if you do not delete it the EULA flag below will be #
|
||||
# overwritten when the modpack is copied and the server #
|
||||
# will not start. #
|
||||
# #
|
||||
####################################################################
|
||||
services:
|
||||
|
||||
####################################################################
|
||||
# Service Name #
|
||||
# #
|
||||
# Define Service Name here. If using RCON this name will be #
|
||||
# referenced again as RWA_RCON_HOST below. #
|
||||
# #
|
||||
# Example: 'name:' or 'mc_atm6:' #
|
||||
####################################################################
|
||||
mc_tnp5:
|
||||
|
||||
####################################################################
|
||||
# Image & Container Name #
|
||||
# #
|
||||
# Specify Image Name and Java Version. The 'image' will always be #
|
||||
# 'itzg/minecraft-server' however the tag added to the end is #
|
||||
# where you can specify the java version or container architecture.#
|
||||
# See readme.md for a full list. #
|
||||
# #
|
||||
# 'container_name:' This can be anything you like. This is the name#
|
||||
# that will show when you run 'docker ps' commands. #
|
||||
####################################################################
|
||||
image: itzg/minecraft-server
|
||||
container_name: mc_tnp5
|
||||
|
||||
####################################################################
|
||||
# Server Ports #
|
||||
# #
|
||||
# Specify external port. #
|
||||
####################################################################
|
||||
ports:
|
||||
- 25565:25565
|
||||
|
||||
####################################################################
|
||||
# Automatic Server Restart #
|
||||
# #
|
||||
# Define a restart policy here. #
|
||||
# - 'no' = Do not restart. #
|
||||
# - 'on-failure' = Restart if container exits because an error. #
|
||||
# - 'always' = Regardless of stop reason. #
|
||||
# - 'unless-stopped' = Similar to always except if stopped. #
|
||||
####################################################################
|
||||
restart: unless-stopped
|
||||
|
||||
####################################################################
|
||||
# Volume and Folder Access #
|
||||
# #
|
||||
# This section defines what folders and volumes you want to give #
|
||||
# this container access to. It is recommended to leaves these set #
|
||||
# to the default values unless you know what you are doing. #
|
||||
# #
|
||||
# Place your mod zip file in a folder called 'modpacks' in the #
|
||||
# same directory you place this docker-compose file. #
|
||||
# #
|
||||
# Specify the data volume name or directory here as well. #
|
||||
# In this example the volume name is 'data'. When docker creates #
|
||||
# the volume it will add what ever name you give it here to the #
|
||||
# end of the container name specified above. In this example it #
|
||||
# would be named 'mc_atm6_data'. If you change this be sure to #
|
||||
# update the volume name at the bottom of this config. #
|
||||
####################################################################
|
||||
volumes:
|
||||
- ./modpacks:/modpacks:ro
|
||||
- data:/data
|
||||
|
||||
####################################################################
|
||||
# EULA #
|
||||
# #
|
||||
# Accept EULA by setting to "true" #
|
||||
####################################################################
|
||||
environment:
|
||||
EULA: "true"
|
||||
|
||||
####################################################################
|
||||
# FORGE INSTALL #
|
||||
# #
|
||||
# Sets install type to FORGE and specifys the zip folder name #
|
||||
# and location of your mod pack. #
|
||||
# #
|
||||
# TYPE: Defines the install type as FORGE #
|
||||
# #
|
||||
# VERSION: Defines the version of MC the modpack is based on. #
|
||||
# #
|
||||
# FORGE_VERSION: Defines the version of FORGE the modpack uses. #
|
||||
# This can usually be found in the modpack.zip as #
|
||||
# installer.jar #
|
||||
# #
|
||||
# GENERIC_PACK: Define where the modpack.zip is located. #
|
||||
# #
|
||||
# Place your mod zip file in a folder called 'modpacks' in the #
|
||||
# same directory you place this docker-compose file. #
|
||||
####################################################################
|
||||
TYPE: FORGE
|
||||
VERSION: 1.18.2
|
||||
FORGE_VERSION: 40.1.73
|
||||
GENERIC_PACK: /modpacks/tnp5.zip
|
||||
|
||||
####################################################################
|
||||
# Server Memory #
|
||||
# #
|
||||
# Set Maximum amount of memory allowed for your server. #
|
||||
####################################################################
|
||||
MEMORY: "8G"
|
||||
|
||||
####################################################################
|
||||
# Logging Options #
|
||||
# #
|
||||
# Set to "true" to delete old logs #
|
||||
####################################################################
|
||||
ENABLE_ROLLING_LOGS: "true"
|
||||
|
||||
####################################################################
|
||||
# Server Timezone #
|
||||
# #
|
||||
# Specify server Timezone #
|
||||
####################################################################
|
||||
TZ: "America/New_York"
|
||||
|
||||
####################################################################
|
||||
# Minecraft Game Options #
|
||||
# #
|
||||
# List any game options you want to define here. A full list can #
|
||||
# be found on the readme.md page on github. #
|
||||
####################################################################
|
||||
OVERRIDE_SERVER_PROPERTIES: "true"
|
||||
DIFFICULTY: "easy"
|
||||
MAX_TICK_TIME: "-1"
|
||||
VIEW_DISTANCE: "6"
|
||||
ALLOW_FLIGHT: "true"
|
||||
OPS: ""
|
||||
MAX_PLAYERS: 10
|
||||
PVP: "false"
|
||||
LEVEL_TYPE: "biomesoplenty"
|
||||
MOTD: "Welcome Home"
|
||||
|
||||
####################################################################
|
||||
# Volumes #
|
||||
# #
|
||||
# Define data volume name here. You should leave this set to the #
|
||||
# default. #
|
||||
####################################################################
|
||||
volumes:
|
||||
data:
|
||||
@@ -1,21 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:${IMAGE_TAG:-latest}
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FORGE
|
||||
DEBUG: "${DEBUG:-false}"
|
||||
VERSION: ${VERSION:-1.17.1}
|
||||
FORGE_VERSION: ${FORGE_VERSION:-37.0.90}
|
||||
GENERIC_PACK: /modpacks/${MODPACK:-Server-Files-0.0.21.zip}
|
||||
REMOVE_OLD_MODS: "${REMOVE_OLD_MODS:-false}"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,17 +0,0 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: MAGMA
|
||||
VERSION: 1.16.5
|
||||
volumes:
|
||||
- data:/data
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,18 +0,0 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: FABRIC
|
||||
MODRINTH_PROJECTS: fallingtree
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,19 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FORGE
|
||||
VERSION: 1.15.2
|
||||
MODS_FILE: /extras/mods.txt
|
||||
REMOVE_OLD_MODS: "true"
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./mods.txt:/extras/mods.txt:ro
|
||||
|
||||
volumes:
|
||||
data:
|
||||
@@ -1,21 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./mods:/mods
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "FORGE"
|
||||
VERSION: "1.19.2"
|
||||
DEBUG: "true"
|
||||
SETUP_ONLY: "true"
|
||||
tty: True
|
||||
stdin_open: True
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,17 +0,0 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: MOHIST
|
||||
VERSION: 1.12.2
|
||||
DEBUG: "true"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,19 +1,18 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
container_name: paper
|
||||
environment:
|
||||
EULA: "true"
|
||||
ENABLE_RCON: "true"
|
||||
TYPE: PAPER
|
||||
VIEW_DISTANCE: 10
|
||||
MEMORY: 2G
|
||||
VERSION: 1.9.4
|
||||
# needed for Paper versions before 1.14
|
||||
CONSOLE: "false"
|
||||
ports:
|
||||
- 25565:25565
|
||||
volumes:
|
||||
- mc-paper:/data
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
mc-paper:
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: FABRIC
|
||||
MODS_FORGEAPI_PROJECTIDS: 433175
|
||||
MODS_FORGEAPI_KEY: ${MODS_FORGEAPI_KEY}
|
||||
MODS_FORGEAPI_DOWNLOAD_DEPENDENCIES: "TRUE"
|
||||
REMOVE_OLD_FORGEAPI_MODS: "TRUE"
|
||||
# YAML Heredoc, be sure to use '|-' this will remove the first newline and final new line.
|
||||
# This is versus '|' that will leaving with two empty strings at top and bottom.
|
||||
RCON_CMDS_STARTUP: |-
|
||||
/gamerule doFireTick false
|
||||
/team add New
|
||||
/team add Old
|
||||
/chunky radius 1000
|
||||
/chunky start
|
||||
RCON_CMDS_ON_CONNECT: |-
|
||||
/team join New @a[team=]
|
||||
/give @a[team=New] birch_boat
|
||||
/team join Old @a[team=New]
|
||||
RCON_CMDS_FIRST_CONNECT: |-
|
||||
/chunky pause
|
||||
RCON_CMDS_LAST_DISCONNECT: |-
|
||||
/kill @e[type=minecraft:boat]
|
||||
/chunky continue
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
mc: {}
|
||||
@@ -1,27 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: "FORGE"
|
||||
VERSION: "1.12.2"
|
||||
FORGE_VERSION: "14.23.5.2860"
|
||||
OVERRIDE_SERVER_PROPERTIES: "true"
|
||||
DIFFICULTY: "hard"
|
||||
MAX_TICK_TIME: "-1"
|
||||
ALLOW_FLIGHT: "true"
|
||||
ENABLE_COMMAND_BLOCK: "true"
|
||||
VIEW_DISTANCE: "10"
|
||||
MEMORY: "4G"
|
||||
# Download from https://www.curseforge.com/minecraft/modpacks/rlcraft and place in modpacks subdir
|
||||
GENERIC_PACK: "/modpacks/RLCraft+Server+Pack+1.12.2+-+Release+v2.9.1c.zip"
|
||||
ports:
|
||||
- 25565:25565
|
||||
|
||||
volumes:
|
||||
data:
|
||||
@@ -3,8 +3,6 @@ version: "3.8"
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- 25565:25565
|
||||
environment:
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mc:
|
||||
# Only using IMAGE variable to allow for local testing
|
||||
image: itzg/minecraft-server
|
||||
# image: ${IMAGE:-itzg/minecraft-server}
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: SPIGOT
|
||||
# SPIGET_RESOURCES: 34315,3836
|
||||
SPIGET_RESOURCES: ""
|
||||
REMOVE_OLD_MODS: "true"
|
||||
volumes:
|
||||
- data:/data
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -14,8 +14,8 @@ services:
|
||||
EULA: "TRUE"
|
||||
#VERSION: "1.12.2" (Ensure this is compatbile with the version of SpongeForge you are using!)
|
||||
TYPE: "FORGE"
|
||||
FORGE_VERSION: "RECOMMENDED"
|
||||
#FORGE_VERSION: "14.23.5.2807"
|
||||
FORGEVERSION: "RECOMMENDED"
|
||||
#FORGEVERSION: "14.23.5.2807"
|
||||
CONSOLE: "false"
|
||||
ENABLE_RCON: "true"
|
||||
RCON_PASSWORD: "testing"
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
version: '3'
|
||||
# Other docker-compose examples in /examples
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
- "mc:/data"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
@@ -3,18 +3,18 @@ apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: mc-example
|
||||
name: mc-example
|
||||
app: example
|
||||
name: example
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: mc-example
|
||||
serviceName: example
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mc-example
|
||||
app: example
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mc-example
|
||||
app: example
|
||||
spec:
|
||||
containers:
|
||||
- name: mc
|
||||
@@ -25,18 +25,6 @@ spec:
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: data
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- mc-monitor
|
||||
- status
|
||||
- --host
|
||||
- localhost
|
||||
- --port
|
||||
- "25565"
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 5
|
||||
failureThreshold: 18
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
@@ -51,12 +39,12 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
service: mc-example
|
||||
name: mc-example
|
||||
service: example
|
||||
name: example
|
||||
spec:
|
||||
ports:
|
||||
- port: 25565
|
||||
targetPort: 25565
|
||||
selector:
|
||||
app: mc-example
|
||||
type: NodePort
|
||||
app: example
|
||||
type: LoadBalancer
|
||||
|
||||
@@ -35,17 +35,20 @@ spec:
|
||||
name: main
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: [ "/usr/local/bin/mc-monitor", "status", "--host", "localhost" ]
|
||||
# Give it i + p * f seconds to be ready, so 120 seconds
|
||||
initialDelaySeconds: 20
|
||||
command:
|
||||
- mcstatus
|
||||
- localhost
|
||||
- ping
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
failureThreshold: 20
|
||||
# Monitor ongoing liveness
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/usr/local/bin/mc-monitor", "status", "--host", "localhost"]
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 60
|
||||
command:
|
||||
- mcstatus
|
||||
- localhost
|
||||
- ping
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: mc-data
|
||||
mountPath: /data
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
Place server [modpacks downloaded from CurseForge](https://www.curseforge.com/minecraft/modpacks) in this directory.
|
||||
|
||||
The example [`docker-compose-curseforge.yml`](../docker-compose-curseforge.yml) references a modpack downloaded from <https://www.curseforge.com/minecraft/modpacks/skyfactory-4/files/3012800>.
|
||||
The example [`docker-compose-curseforge.yml`](../docker-compose-curseforge.yml) references a modpack downloaded from <https://www.curseforge.com/minecraft/modpacks/skyfactory-4/files/2787018>.
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
https://edge.forgecdn.net/files/2965/233/Bookshelf-1.15.2-5.6.40.jar
|
||||
https://edge.forgecdn.net/files/2926/27/ProgressiveBosses-2.1.5-mc1.15.2.jar
|
||||
https://edge.forgecdn.net/files/3248/905/goblintraders-1.3.1-1.15.2.jar
|
||||
https://edge.forgecdn.net/files/3272/32/jei-1.15.2-6.0.3.16.jar
|
||||
https://edge.forgecdn.net/files/2871/647/ToastControl-1.15.2-3.0.1.jar
|
||||
https://edge.forgecdn.net/files/3101/903/Druidcraft-1.15-0.4.45.jar
|
||||
https://edge.forgecdn.net/files/2880/426/DefaultOptions_1.15.2-11.0.1.jar
|
||||
https://edge.forgecdn.net/files/2996/535/MekanismAdditions-1.15.2-9.10.9.422.jar
|
||||
https://edge.forgecdn.net/files/3147/275/blockcarpentry-1.15-0.8.2.jar
|
||||
https://edge.forgecdn.net/files/3005/715/refinedstorageaddons-0.6.3.jar
|
||||
https://edge.forgecdn.net/files/3140/146/rftoolsbase-1.15-1.1.10.jar
|
||||
https://edge.forgecdn.net/files/3236/649/cc-tweaked-1.15.2-1.95.3.jar
|
||||
https://edge.forgecdn.net/files/3048/970/light-overlay-4.7.2.jar
|
||||
https://edge.forgecdn.net/files/3015/904/randompatches-1.15.2-1.22.1.1.jar
|
||||
https://edge.forgecdn.net/files/3131/439/engineersdecor-1.15.2-1.1.4.jar
|
||||
https://edge.forgecdn.net/files/3051/255/carryon-1.15.2-1.13.0.5.jar
|
||||
https://edge.forgecdn.net/files/3175/752/EnderStorage-1.15.2-2.5.2.164-universal.jar
|
||||
https://edge.forgecdn.net/files/2997/84/Savage-and-Ravage-1.15.2-1.1.4.jar
|
||||
https://edge.forgecdn.net/files/3053/840/PackMenu-1.15.2-1.2.8.jar
|
||||
https://edge.forgecdn.net/files/3003/397/JEITweaker-1.15.2-1.0.1.3.jar
|
||||
https://edge.forgecdn.net/files/3069/489/absentbydesign-1.15.2-1.1.1.jar
|
||||
https://edge.forgecdn.net/files/2997/601/Upgrade-Aquatic-1.15.2-1.7.1.jar
|
||||
https://edge.forgecdn.net/files/2950/766/ReAuth-1.14-1.15-3.8.1.jar
|
||||
https://edge.forgecdn.net/files/3024/179/Powah-1.15.2-1.1.15.jar
|
||||
https://edge.forgecdn.net/files/3092/975/StorageDrawers-1.15.2-7.0.3.jar
|
||||
https://edge.forgecdn.net/files/2853/267/furniture-7.0.0-pre16-1.15.1.jar
|
||||
https://edge.forgecdn.net/files/2987/251/AppleSkin-mc1.15.2-forge-1.0.14.jar
|
||||
https://edge.forgecdn.net/files/2980/323/industrial-foregoing-1.15.2-2.3.3-e356e61.jar
|
||||
https://edge.forgecdn.net/files/3024/178/Lollipop-1.15.2-1.0.16.jar
|
||||
https://edge.forgecdn.net/files/3210/106/tablechair-1.4.jar
|
||||
https://edge.forgecdn.net/files/3047/358/xercapaint-1.15.2-3.3.jar
|
||||
https://edge.forgecdn.net/files/2873/657/BonsaiTrees-2.1.2.6.jar
|
||||
https://edge.forgecdn.net/files/2938/583/config-2-3.0.jar
|
||||
https://edge.forgecdn.net/files/2991/235/Waystones_1.15.2-6.0.2.jar
|
||||
https://edge.forgecdn.net/files/2957/23/OpenLoader-1.15.2-4.0.5.jar
|
||||
https://edge.forgecdn.net/files/3275/718/XaerosWorldMap_1.13.2_Forge_1.15.2.jar
|
||||
https://edge.forgecdn.net/files/2876/104/AI-Improvements-1.15.2-0.3.0.jar
|
||||
https://edge.forgecdn.net/files/3005/515/mysticallib-1.15.2-2.0.1.jar
|
||||
https://edge.forgecdn.net/files/3008/867/WAWLA-1.15.2-3.0.4.jar
|
||||
https://edge.forgecdn.net/files/2964/474/WailaHarvestability-mc1.15.2-1.1.12.jar
|
||||
https://edge.forgecdn.net/files/3103/508/Kiwi-1.15.2-2.8.5.jar
|
||||
https://edge.forgecdn.net/files/3128/662/Atum-1.15.2-2.1.12.jar
|
||||
https://edge.forgecdn.net/files/2988/910/Buzzier-Bees-1.15.2-1.5.2.jar
|
||||
https://edge.forgecdn.net/files/3030/627/u_team_core-1.15.2-3.0.2.169.jar
|
||||
https://edge.forgecdn.net/files/3003/984/SilentLib-1.15.2-4.6.6+59.jar
|
||||
https://edge.forgecdn.net/files/2968/353/refinedpipes-0.4.2.jar
|
||||
https://edge.forgecdn.net/files/3140/149/rftoolsbuilder-1.15-2.1.16.jar
|
||||
https://edge.forgecdn.net/files/3067/203/mightyarchitect-mc1.15.2_v0.5.jar
|
||||
https://edge.forgecdn.net/files/2980/153/EquipmentTooltips-1.15.2-1.4.3+14.jar
|
||||
https://edge.forgecdn.net/files/3103/510/FruitTrees-1.15.2-1.7.0.jar
|
||||
https://edge.forgecdn.net/files/2989/38/Atmospheric-1.15.2-1.4.1.jar
|
||||
https://edge.forgecdn.net/files/3096/836/rftoolscontrol-1.15-3.0.9.jar
|
||||
https://edge.forgecdn.net/files/2989/662/Enhanced-Mushrooms-1.15.2-v1.2.2.jar
|
||||
https://edge.forgecdn.net/files/3227/891/SimpleStorageNetwork-1.15.2-1.0.2.jar
|
||||
https://edge.forgecdn.net/files/3217/290/minecolonies-0.13.645-RELEASE-universal.jar
|
||||
https://edge.forgecdn.net/files/2935/384/SnowRealMagic-1.15.2-1.7.5.jar
|
||||
https://edge.forgecdn.net/files/2988/584/aiotbotania-1.15.2-1.2.3.jar
|
||||
https://edge.forgecdn.net/files/3255/408/mowziesmobs-1.5.15.jar
|
||||
https://edge.forgecdn.net/files/3062/510/HealthOverlay-1.15.2-1.0.2.jar
|
||||
https://edge.forgecdn.net/files/3023/121/neoncraft-1.1.jar
|
||||
https://edge.forgecdn.net/files/2997/617/Swamp-Expansion-1.15.2-1.7.3.jar
|
||||
https://edge.forgecdn.net/files/2980/252/titanium-1.15.2-2.4.2.jar
|
||||
https://edge.forgecdn.net/files/3152/946/rftoolsutility-1.15-2.1.20.jar
|
||||
https://edge.forgecdn.net/files/3083/277/swingthroughgrass-1.15.2-1.4.1.jar
|
||||
https://edge.forgecdn.net/files/3138/530/SilentGear-1.15.2-1.11.4+187.jar
|
||||
https://edge.forgecdn.net/files/3105/429/DarkUtilities-1.15.2-3.1.9.jar
|
||||
https://edge.forgecdn.net/files/3099/23/ImmersiveEngineering-1.15.2-4.1.1-125.jar
|
||||
https://edge.forgecdn.net/files/2856/529/FastFurnace-1.15.1-3.0.0.jar
|
||||
https://edge.forgecdn.net/files/2988/999/BiomesOPlenty-1.15.2-10.0.0.366-universal.jar
|
||||
https://edge.forgecdn.net/files/2989/95/The-Endergetic-Expansion-1.15.2-v1.3.2.jar
|
||||
https://edge.forgecdn.net/files/2993/960/FluxNetworks-1.15.2-5.0.3-4.jar
|
||||
https://edge.forgecdn.net/files/3028/611/ServerTabInfo-1.15.2-1.2.8.jar
|
||||
https://edge.forgecdn.net/files/3134/277/fairylights-3.0.15-1.15.2.jar
|
||||
https://edge.forgecdn.net/files/3048/54/useful_backpacks-1.15.2-1.10.3.77.jar
|
||||
https://edge.forgecdn.net/files/3273/515/mcw-trapdoors-1.0.2-mc1.15.2.jar
|
||||
https://edge.forgecdn.net/files/2986/639/CraftingTweaks_1.15.2-11.0.1.jar
|
||||
https://edge.forgecdn.net/files/3261/454/create-mc1.15.2_v0.3.1a.jar
|
||||
https://edge.forgecdn.net/files/3211/10/supermartijn642configlib-1.0.5-mc1.15.jar
|
||||
https://edge.forgecdn.net/files/2995/786/TerraForged-1.15.2-0.0.15.jar
|
||||
https://edge.forgecdn.net/files/2892/562/leavesdecayonotherleaves-1.1.jar
|
||||
@@ -1,10 +0,0 @@
|
||||
This project demonstrates the use of two compose projects, `dbs` and `servers`, where the following capabilities are demonstrated:
|
||||
|
||||
- Managing databases, such as MariaDB, in its own compose project: `dbs`
|
||||
- Using an `.env` file to avoid including user details within the compose file
|
||||
- Accessing the database from a separate project, `servers`, via an external network declaration
|
||||
- LuckPerms is configured to access the MariaDB instance
|
||||
- Isolating the Minecraft server container by purposely **not** declaring port mappings
|
||||
- Running Waterfall as a proxy
|
||||
- Using configuration mount points to pre-configure Waterfall and the Minecraft server
|
||||
- Using Spiget to download plugins, in this case LuckPerms
|
||||
@@ -1,2 +0,0 @@
|
||||
LUCKPERMS_USER=luckperms
|
||||
LUCKPERMS_PASSWORD=luckpermspw
|
||||
@@ -1,21 +0,0 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10
|
||||
environment:
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: yes
|
||||
MARIADB_DATABASE: luckperms
|
||||
# These are loaded by compose from .env
|
||||
MARIADB_USER: ${LUCKPERMS_USER}
|
||||
MARIADB_PASSWORD: ${LUCKPERMS_PASSWORD}
|
||||
volumes:
|
||||
- mariadb:/var/lib/mysql
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
ports:
|
||||
- "8806:8080"
|
||||
|
||||
volumes:
|
||||
mariadb: {}
|
||||
@@ -1,41 +0,0 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
proxy:
|
||||
image: itzg/bungeecord
|
||||
environment:
|
||||
TYPE: WATERFALL
|
||||
ports:
|
||||
- "25565:25577"
|
||||
volumes:
|
||||
- waterfall:/server
|
||||
- ./waterfall-config:/config
|
||||
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: PAPER
|
||||
# 28140: luckperms
|
||||
SPIGET_RESOURCES: "28140"
|
||||
# since we're behind a proxy
|
||||
ONLINE_MODE: "false"
|
||||
volumes:
|
||||
- mc:/data
|
||||
# mainly to drop in config files specific to plugins
|
||||
- ./mc-plugins:/plugins
|
||||
networks:
|
||||
# so proxy can reach us
|
||||
- default
|
||||
# so we can use databases project
|
||||
- dbs
|
||||
|
||||
volumes:
|
||||
mc: {}
|
||||
waterfall: {}
|
||||
|
||||
networks:
|
||||
dbs:
|
||||
# declared in ../dbs
|
||||
external: true
|
||||
name: dbs_default
|
||||
@@ -1,710 +0,0 @@
|
||||
####################################################################################################
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | __ __ ___ __ __ | #
|
||||
# | | | | / ` |__/ |__) |__ |__) |\/| /__` | #
|
||||
# | |___ \__/ \__, | \ | |___ | \ | | .__/ | #
|
||||
# | | #
|
||||
# | https://luckperms.net | #
|
||||
# | | #
|
||||
# | WIKI: https://luckperms.net/wiki | #
|
||||
# | DISCORD: https://discord.gg/luckperms | #
|
||||
# | BUG REPORTS: https://github.com/lucko/LuckPerms/issues | #
|
||||
# | | #
|
||||
# | Each option in this file is documented and explained here: | #
|
||||
# | ==> https://luckperms.net/wiki/Configuration | #
|
||||
# | | #
|
||||
# | New options are not added to this file automatically. Default values are used if an | #
|
||||
# | option cannot be found. The latest config versions can be obtained at the link above. | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
####################################################################################################
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | | #
|
||||
# | ESSENTIAL SETTINGS | #
|
||||
# | | #
|
||||
# | Important settings that control how LuckPerms functions. | #
|
||||
# | | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# The name of the server, used for server specific permissions.
|
||||
#
|
||||
# - When set to "global" this setting is effectively ignored.
|
||||
# - In all other cases, the value here is added to all players in a "server" context.
|
||||
# - See: https://luckperms.net/wiki/Context
|
||||
server: global
|
||||
|
||||
# If the servers own UUID cache/lookup facility should be used when there is no record for a player
|
||||
# already in LuckPerms.
|
||||
#
|
||||
# - When this is set to 'false', commands using a player's username will not work unless the player
|
||||
# has joined since LuckPerms was first installed.
|
||||
# - To get around this, you can use a player's uuid directly in the command, or enable this option.
|
||||
# - When this is set to 'true', the server facility is used. This may use a number of methods,
|
||||
# including checking the servers local cache, or making a request to the Mojang API.
|
||||
use-server-uuid-cache: false
|
||||
|
||||
|
||||
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | | #
|
||||
# | STORAGE SETTINGS | #
|
||||
# | | #
|
||||
# | Controls which storage method LuckPerms will use to store data. | #
|
||||
# | | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# How the plugin should store data
|
||||
#
|
||||
# - The various options are explained in more detail on the wiki:
|
||||
# https://luckperms.net/wiki/Storage-types
|
||||
#
|
||||
# - Possible options:
|
||||
#
|
||||
# | Remote databases - require connection information to be configured below
|
||||
# |=> MySQL
|
||||
# |=> MariaDB (preferred over MySQL)
|
||||
# |=> PostgreSQL
|
||||
# |=> MongoDB
|
||||
#
|
||||
# | Flatfile/local database - don't require any extra configuration
|
||||
# |=> H2 (preferred over SQLite)
|
||||
# |=> SQLite
|
||||
#
|
||||
# | Readable & editable text files - don't require any extra configuration
|
||||
# |=> YAML (.yml files)
|
||||
# |=> JSON (.json files)
|
||||
# |=> HOCON (.conf files)
|
||||
# |=> TOML (.toml files)
|
||||
# |
|
||||
# | By default, user, group and track data is separated into different files. Data can be combined
|
||||
# | and all stored in the same file by switching to a combined storage variant.
|
||||
# | Just add '-combined' to the end of the storage-method, e.g. 'yaml-combined'
|
||||
#
|
||||
# - A H2 database is the default option.
|
||||
# - If you want to edit data manually in "traditional" storage files, we suggest using YAML.
|
||||
storage-method: MariaDB
|
||||
|
||||
# The following block defines the settings for remote database storage methods.
|
||||
#
|
||||
# - You don't need to touch any of the settings here if you're using a local storage method!
|
||||
# - The connection detail options are shared between all remote storage types.
|
||||
data:
|
||||
|
||||
# Define the address and port for the database.
|
||||
# - The standard DB engine port is used by default
|
||||
# (MySQL: 3306, PostgreSQL: 5432, MongoDB: 27017)
|
||||
# - Specify as "host:port" if differs
|
||||
address: mariadb
|
||||
|
||||
# The name of the database to store LuckPerms data in.
|
||||
# - This must be created already. Don't worry about this setting if you're using MongoDB.
|
||||
database: luckperms
|
||||
|
||||
# Credentials for the database.
|
||||
username: luckperms
|
||||
password: 'luckpermspw'
|
||||
|
||||
# These settings apply to the MySQL connection pool.
|
||||
# - The default values will be suitable for the majority of users.
|
||||
# - Do not change these settings unless you know what you're doing!
|
||||
pool-settings:
|
||||
|
||||
# Sets the maximum size of the MySQL connection pool.
|
||||
# - Basically this value will determine the maximum number of actual
|
||||
# connections to the database backend.
|
||||
# - More information about determining the size of connection pools can be found here:
|
||||
# https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing
|
||||
maximum-pool-size: 10
|
||||
|
||||
# Sets the minimum number of idle connections that the pool will try to maintain.
|
||||
# - For maximum performance and responsiveness to spike demands, it is recommended to not set
|
||||
# this value and instead allow the pool to act as a fixed size connection pool.
|
||||
# (set this value to the same as 'maximum-pool-size')
|
||||
minimum-idle: 10
|
||||
|
||||
# This setting controls the maximum lifetime of a connection in the pool in milliseconds.
|
||||
# - The value should be at least 30 seconds less than any database or infrastructure imposed
|
||||
# connection time limit.
|
||||
maximum-lifetime: 1800000 # 30 minutes
|
||||
|
||||
# This setting controls how frequently the pool will 'ping' a connection in order to prevent it
|
||||
# from being timed out by the database or network infrastructure, measured in milliseconds.
|
||||
# - The value should be less than maximum-lifetime and greater than 30000 (30 seconds).
|
||||
# - Setting the value to zero will disable the keepalive functionality.
|
||||
keepalive-time: 0
|
||||
|
||||
# This setting controls the maximum number of milliseconds that the plugin will wait for a
|
||||
# connection from the pool, before timing out.
|
||||
connection-timeout: 5000 # 5 seconds
|
||||
|
||||
# This setting allows you to define extra properties for connections.
|
||||
#
|
||||
# By default, the following options are set to enable utf8 encoding. (you may need to remove
|
||||
# these if you are using PostgreSQL)
|
||||
# useUnicode: true
|
||||
# characterEncoding: utf8
|
||||
#
|
||||
# You can also use this section to disable SSL connections, by uncommenting the 'useSSL' and
|
||||
# 'verifyServerCertificate' options below.
|
||||
properties:
|
||||
useUnicode: true
|
||||
characterEncoding: utf8
|
||||
#useSSL: false
|
||||
#verifyServerCertificate: false
|
||||
|
||||
# The prefix for all LuckPerms SQL tables.
|
||||
#
|
||||
# - This only applies for remote SQL storage types (MySQL, MariaDB, etc).
|
||||
# - Change this if you want to use different tables for different servers.
|
||||
table-prefix: 'luckperms_'
|
||||
|
||||
# The prefix to use for all LuckPerms MongoDB collections.
|
||||
#
|
||||
# - This only applies for the MongoDB storage type.
|
||||
# - Change this if you want to use different collections for different servers. The default is no
|
||||
# prefix.
|
||||
mongodb-collection-prefix: ''
|
||||
|
||||
# The connection string URI to use to connect to the MongoDB instance.
|
||||
#
|
||||
# - When configured, this setting will override anything defined in the address, database,
|
||||
# username or password fields above.
|
||||
# - If you have a connection string that starts with 'mongodb://' or 'mongodb+srv://', enter it
|
||||
# below.
|
||||
# - For more information, please see https://docs.mongodb.com/manual/reference/connection-string/
|
||||
mongodb-connection-uri: ''
|
||||
|
||||
# Define settings for a "split" storage setup.
|
||||
#
|
||||
# - This allows you to define a storage method for each type of data.
|
||||
# - The connection options above still have to be correct for each type here.
|
||||
split-storage:
|
||||
# Don't touch this if you don't want to use split storage!
|
||||
enabled: false
|
||||
methods:
|
||||
# These options don't need to be modified if split storage isn't enabled.
|
||||
user: h2
|
||||
group: h2
|
||||
track: h2
|
||||
uuid: h2
|
||||
log: h2
|
||||
|
||||
|
||||
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | | #
|
||||
# | UPDATE PROPAGATION & MESSAGING SERVICE | #
|
||||
# | | #
|
||||
# | Controls the ways in which LuckPerms will sync data & notify other servers of changes. | #
|
||||
# | These options are documented on greater detail on the wiki under "Instant Updates". | #
|
||||
# | | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# This option controls how frequently LuckPerms will perform a sync task.
|
||||
#
|
||||
# - A sync task will refresh all data from the storage, and ensure that the most up-to-date data is
|
||||
# being used by the plugin.
|
||||
# - This is disabled by default, as most users will not need it. However, if you're using a remote
|
||||
# storage type without a messaging service setup, you may wish to set this to something like 3.
|
||||
# - Set to -1 to disable the task completely.
|
||||
sync-minutes: -1
|
||||
|
||||
# If the file watcher should be enabled.
|
||||
#
|
||||
# - When using a file-based storage type, LuckPerms can monitor the data files for changes, and
|
||||
# automatically update when changes are detected.
|
||||
# - If you don't want this feature to be active, set this option to false.
|
||||
watch-files: true
|
||||
|
||||
# Define which messaging service should be used by the plugin.
|
||||
#
|
||||
# - If enabled and configured, LuckPerms will use the messaging service to inform other connected
|
||||
# servers of changes.
|
||||
# - Use the command "/lp networksync" to manually push changes.
|
||||
# - Data is NOT stored using this service. It is only used as a messaging platform.
|
||||
#
|
||||
# - If you decide to enable this feature, you should set "sync-minutes" to -1, as there is no need
|
||||
# for LuckPerms to poll the database for changes.
|
||||
#
|
||||
# - Possible options:
|
||||
# => sql Uses the SQL database to form a queue system for communication. Will only work when
|
||||
# 'storage-method' is set to MySQL or MariaDB. This is chosen by default if the
|
||||
# option is set to 'auto' and SQL storage is in use. Set to 'notsql' to disable this.
|
||||
# => pluginmsg Uses the plugin messaging channels to communicate with the proxy.
|
||||
# LuckPerms must be installed on your proxy & all connected servers backend servers.
|
||||
# Won't work if you have more than one proxy.
|
||||
# => lilypad Uses LilyPad pub-sub to push changes. You need to have the LilyPad-Connect plugin
|
||||
# installed.
|
||||
# => redis Uses Redis pub-sub to push changes. Your server connection info must be configured
|
||||
# below.
|
||||
# => rabbitmq Uses RabbitMQ pub-sub to push changes. Your server connection info must be
|
||||
# configured below.
|
||||
# => custom Uses a messaging service provided using the LuckPerms API.
|
||||
# => auto Attempts to automatically setup a messaging service using redis or sql.
|
||||
messaging-service: auto
|
||||
|
||||
# If LuckPerms should automatically push updates after a change has been made with a command.
|
||||
auto-push-updates: true
|
||||
|
||||
# If LuckPerms should push logging entries to connected servers via the messaging service.
|
||||
push-log-entries: true
|
||||
|
||||
# If LuckPerms should broadcast received logging entries to players on this platform.
|
||||
#
|
||||
# - If you have LuckPerms installed on your backend servers as well as a BungeeCord proxy, you
|
||||
# should set this option to false on either your backends or your proxies, to avoid players being
|
||||
# messaged twice about log entries.
|
||||
broadcast-received-log-entries: true
|
||||
|
||||
# Settings for Redis.
|
||||
# Port 6379 is used by default; set address to "host:port" if differs
|
||||
redis:
|
||||
enabled: false
|
||||
address: localhost
|
||||
username: ''
|
||||
password: ''
|
||||
|
||||
# Settings for RabbitMQ.
|
||||
# Port 5672 is used by default; set address to "host:port" if differs
|
||||
rabbitmq:
|
||||
enabled: false
|
||||
address: localhost
|
||||
vhost: '/'
|
||||
username: 'guest'
|
||||
password: 'guest'
|
||||
|
||||
|
||||
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | | #
|
||||
# | CUSTOMIZATION SETTINGS | #
|
||||
# | | #
|
||||
# | Settings that allow admins to customize the way LuckPerms operates. | #
|
||||
# | | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# Controls how temporary permissions/parents/meta should be accumulated.
|
||||
#
|
||||
# - The default behaviour is "deny".
|
||||
# - This behaviour can also be specified when the command is executed. See the command usage
|
||||
# documentation for more info.
|
||||
#
|
||||
# - Possible options:
|
||||
# => accumulate durations will be added to the existing expiry time
|
||||
# => replace durations will be replaced if the new duration is later than the current
|
||||
# expiration
|
||||
# => deny the command will just fail if you try to add another node with the same expiry
|
||||
temporary-add-behaviour: deny
|
||||
|
||||
# Controls how LuckPerms will determine a users "primary" group.
|
||||
#
|
||||
# - The meaning and influence of "primary groups" are explained in detail on the wiki.
|
||||
# - The preferred approach is to let LuckPerms automatically determine a users primary group
|
||||
# based on the relative weight of their parent groups.
|
||||
#
|
||||
# - Possible options:
|
||||
# => stored use the value stored against the users record in the file/database
|
||||
# => parents-by-weight just use the users most highly weighted parent
|
||||
# => all-parents-by-weight same as above, but calculates based upon all parents inherited from
|
||||
# both directly and indirectly
|
||||
primary-group-calculation: parents-by-weight
|
||||
|
||||
# If the plugin should check for "extra" permissions with users run LP commands.
|
||||
#
|
||||
# - These extra permissions allow finer control over what users can do with each command, and who
|
||||
# they have access to edit.
|
||||
# - The nature of the checks are documented on the wiki under "Argument based command permissions".
|
||||
# - Argument based permissions are *not* static, unlike the 'base' permissions, and will depend upon
|
||||
# the arguments given within the command.
|
||||
argument-based-command-permissions: false
|
||||
|
||||
# If the plugin should check whether senders are a member of a given group before they're able to
|
||||
# edit the groups data or add/remove other users to/from it.
|
||||
# Note: these limitations do not apply to the web editor!
|
||||
require-sender-group-membership-to-modify: false
|
||||
|
||||
# If the plugin should send log notifications to users whenever permissions are modified.
|
||||
#
|
||||
# - Notifications are only sent to those with the appropriate permission to receive them
|
||||
# - They can also be temporarily enabled/disabled on a per-user basis using
|
||||
# '/lp log notify <on|off>'
|
||||
log-notify: true
|
||||
|
||||
# Defines a list of log entries which should not be sent as notifications to users.
|
||||
#
|
||||
# - Each entry in the list is a RegEx expression which is matched against the log entry description.
|
||||
log-notify-filtered-descriptions:
|
||||
# - "parent add example"
|
||||
|
||||
# If LuckPerms should automatically install translation bundles and periodically update them.
|
||||
auto-install-translations: true
|
||||
|
||||
# Defines the options for prefix and suffix stacking.
|
||||
#
|
||||
# - The feature allows you to display multiple prefixes or suffixes alongside a players username in
|
||||
# chat.
|
||||
# - It is explained and documented in more detail on the wiki under "Prefix & Suffix Stacking".
|
||||
#
|
||||
# - The options are divided into separate sections for prefixes and suffixes.
|
||||
# - The 'duplicates' setting refers to how duplicate elements are handled. Can be 'retain-all',
|
||||
# 'first-only' or 'last-only'.
|
||||
# - The value of 'start-spacer' is included at the start of the resultant prefix/suffix.
|
||||
# - The value of 'end-spacer' is included at the end of the resultant prefix/suffix.
|
||||
# - The value of 'middle-spacer' is included between each element in the resultant prefix/suffix.
|
||||
#
|
||||
# - Possible format options:
|
||||
# => highest Selects the value with the highest weight, from all values
|
||||
# held by or inherited by the player.
|
||||
#
|
||||
# => lowest Same as above, except takes the one with the lowest weight.
|
||||
#
|
||||
# => highest_own Selects the value with the highest weight, but will not
|
||||
# accept any inherited values.
|
||||
#
|
||||
# => lowest_own Same as above, except takes the value with the lowest weight.
|
||||
#
|
||||
# => highest_inherited Selects the value with the highest weight, but will only
|
||||
# accept inherited values.
|
||||
#
|
||||
# => lowest_inherited Same as above, except takes the value with the lowest weight.
|
||||
#
|
||||
# => highest_on_track_<track> Selects the value with the highest weight, but only if the
|
||||
# value was inherited from a group on the given track.
|
||||
#
|
||||
# => lowest_on_track_<track> Same as above, except takes the value with the lowest weight.
|
||||
#
|
||||
# => highest_not_on_track_<track> Selects the value with the highest weight, but only if the
|
||||
# value was inherited from a group not on the given track.
|
||||
#
|
||||
# => lowest_not_on_track_<track> Same as above, except takes the value with the lowest weight.
|
||||
#
|
||||
# => highest_from_group_<group> Selects the value with the highest weight, but only if the
|
||||
# value was inherited from the given group.
|
||||
#
|
||||
# => lowest_from_group_<group> Same as above, except takes the value with the lowest weight.
|
||||
#
|
||||
# => highest_not_from_group_<group> Selects the value with the highest weight, but only if the
|
||||
# value was not inherited from the given group.
|
||||
#
|
||||
# => lowest_not_from_group_<group> Same as above, except takes the value with the lowest weight.
|
||||
meta-formatting:
|
||||
prefix:
|
||||
format:
|
||||
- "highest"
|
||||
duplicates: first-only
|
||||
start-spacer: ""
|
||||
middle-spacer: " "
|
||||
end-spacer: ""
|
||||
suffix:
|
||||
format:
|
||||
- "highest"
|
||||
duplicates: first-only
|
||||
start-spacer: ""
|
||||
middle-spacer: " "
|
||||
end-spacer: ""
|
||||
|
||||
|
||||
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | | #
|
||||
# | PERMISSION CALCULATION AND INHERITANCE | #
|
||||
# | | #
|
||||
# | Modify the way permission checks, meta lookups and inheritance resolutions are handled. | #
|
||||
# | | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# The algorithm LuckPerms should use when traversing the "inheritance tree".
|
||||
#
|
||||
# - Possible options:
|
||||
# => breadth-first See: https://en.wikipedia.org/wiki/Breadth-first_search
|
||||
# => depth-first-pre-order See: https://en.wikipedia.org/wiki/Depth-first_search
|
||||
# => depth-first-post-order See: https://en.wikipedia.org/wiki/Depth-first_search
|
||||
inheritance-traversal-algorithm: depth-first-pre-order
|
||||
|
||||
# If a final sort according to "inheritance rules" should be performed after the traversal algorithm
|
||||
# has resolved the inheritance tree.
|
||||
#
|
||||
# "Inheritance rules" refers to things such as group weightings, primary group status, and the
|
||||
# natural contextual ordering of the group nodes.
|
||||
#
|
||||
# Setting this to 'true' will allow for the inheritance rules to take priority over the structure of
|
||||
# the inheritance tree.
|
||||
#
|
||||
# Effectively when this setting is 'true': the tree is flattened, and rules applied afterwards,
|
||||
# and when this setting is 'false':, the rules are just applied during each step of the traversal.
|
||||
post-traversal-inheritance-sort: false
|
||||
|
||||
# Defines the mode used to determine whether a set of contexts are satisfied.
|
||||
#
|
||||
# - Possible options:
|
||||
# => at-least-one-value-per-key Set A will be satisfied by another set B, if at least one of the
|
||||
# key-value entries per key in A are also in B.
|
||||
# => all-values-per-key Set A will be satisfied by another set B, if all key-value
|
||||
# entries in A are also in B.
|
||||
context-satisfy-mode: at-least-one-value-per-key
|
||||
|
||||
# LuckPerms has a number of built-in contexts. These can be disabled by adding the context key to
|
||||
# the list below.
|
||||
disabled-contexts:
|
||||
# - "world"
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | Permission resolution settings | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# If users on this server should have their global permissions applied.
|
||||
# When set to false, only server specific permissions will apply for users on this server
|
||||
include-global: true
|
||||
|
||||
# If users on this server should have their global world permissions applied.
|
||||
# When set to false, only world specific permissions will apply for users on this server
|
||||
include-global-world: true
|
||||
|
||||
# If users on this server should have global (non-server specific) groups applied
|
||||
apply-global-groups: true
|
||||
|
||||
# If users on this server should have global (non-world specific) groups applied
|
||||
apply-global-world-groups: true
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | Meta lookup settings | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# Defines how meta values should be selected.
|
||||
#
|
||||
# - Possible options:
|
||||
# => inheritance Selects the meta value that was inherited first
|
||||
# => highest-number Selects the highest numerical meta value
|
||||
# => lowest-number Selects the lowest numerical meta value
|
||||
meta-value-selection-default: inheritance
|
||||
|
||||
# Defines how meta values should be selected per key.
|
||||
meta-value-selection:
|
||||
# max-homes: highest-number
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | Inheritance settings | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# If the plugin should apply wildcard permissions.
|
||||
#
|
||||
# - If set to true, LuckPerms will detect wildcard permissions, and resolve & apply all registered
|
||||
# permissions matching the wildcard.
|
||||
apply-wildcards: true
|
||||
|
||||
# If LuckPerms should resolve and apply permissions according to the Sponge style implicit wildcard
|
||||
# inheritance system.
|
||||
#
|
||||
# - That being: If a user has been granted "example", then the player should have also be
|
||||
# automatically granted "example.function", "example.another", "example.deeper.nesting",
|
||||
# and so on.
|
||||
apply-sponge-implicit-wildcards: false
|
||||
|
||||
# If the plugin should apply negated Bukkit default permissions before it considers wildcard
|
||||
# assignments.
|
||||
#
|
||||
# - Plugin authors can define permissions which explicitly should not be given automatically to OPs.
|
||||
# This is usually used for so called "anti-permissions" - permissions which, when granted, apply
|
||||
# something negative.
|
||||
# - If this option is set to true, LuckPerms will consider any negated declarations made by
|
||||
# plugins before it considers wildcards. (similar to the way the OP system works)
|
||||
# - If this option is set to false, LuckPerms will consider any wildcard assignments first.
|
||||
apply-default-negated-permissions-before-wildcards: false
|
||||
|
||||
# If the plugin should parse regex permissions.
|
||||
#
|
||||
# - If set to true, LuckPerms will detect regex permissions, marked with "r=" at the start of the
|
||||
# node, and resolve & apply all registered permissions matching the regex.
|
||||
apply-regex: true
|
||||
|
||||
# If the plugin should complete and apply shorthand permissions.
|
||||
#
|
||||
# - If set to true, LuckPerms will detect and expand shorthand node patterns.
|
||||
apply-shorthand: true
|
||||
|
||||
# If the plugin should apply Bukkit child permissions.
|
||||
#
|
||||
# - Plugin authors can define custom permissions structures for their plugin, which will be resolved
|
||||
# and used by LuckPerms if this setting is enabled.
|
||||
apply-bukkit-child-permissions: true
|
||||
|
||||
# If the plugin should apply Bukkit default permissions.
|
||||
#
|
||||
# - Plugin authors can define permissions which should be given to all users by default, or setup
|
||||
# permissions which should/shouldn't be given to opped players.
|
||||
# - If this option is set to false, LuckPerms will ignore these defaults.
|
||||
apply-bukkit-default-permissions: true
|
||||
|
||||
# If the plugin should apply attachment permissions.
|
||||
#
|
||||
# - Other plugins on the server are able to add their own "permission attachments" to players.
|
||||
# - This allows them to grant players additional permissions which last until the end of the
|
||||
# session, or until they're removed.
|
||||
# - If this option is set to false, LuckPerms will not include these attachment permissions when
|
||||
# considering if a player should have access to a certain permission.
|
||||
apply-bukkit-attachment-permissions: true
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | Extra settings | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# A list of context calculators which will be skipped when calculating contexts.
|
||||
#
|
||||
# - You can disable context calculators by either:
|
||||
# => specifying the Java class name used by the calculator (e.g. com.example.ExampleCalculator)
|
||||
# => specifying a sub-section of the Java package used by the calculator (e.g. com.example)
|
||||
disabled-context-calculators: []
|
||||
|
||||
# Allows you to set "aliases" for the worlds sent forward for context calculation.
|
||||
#
|
||||
# - These aliases are provided in addition to the real world name. Applied recursively.
|
||||
# - Remove the comment characters for the default aliases to apply.
|
||||
world-rewrite:
|
||||
# world_nether: world
|
||||
# world_the_end: world
|
||||
|
||||
# Define special group weights for this server.
|
||||
#
|
||||
# - Group weights can also be applied directly to group data, using the setweight command.
|
||||
# - This section allows weights to be set on a per-server basis.
|
||||
group-weight:
|
||||
# admin: 10
|
||||
|
||||
|
||||
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | | #
|
||||
# | FINE TUNING OPTIONS | #
|
||||
# | | #
|
||||
# | A number of more niche settings for tweaking and changing behaviour. The section also | #
|
||||
# | contains toggles for some more specialised features. It is only necessary to make changes to | #
|
||||
# | these options if you want to fine-tune LuckPerms behaviour. | #
|
||||
# | | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | Server Operator (OP) settings | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# Controls whether server operators should exist at all.
|
||||
#
|
||||
# - When set to 'false', all players will be de-opped, and the /op and /deop commands will be
|
||||
# disabled. Note that vanilla features like the spawn-protection require an operator on the
|
||||
# server to work.
|
||||
enable-ops: true
|
||||
|
||||
# Enables or disables a special permission based system in LuckPerms for controlling OP status.
|
||||
#
|
||||
# - If set to true, any user with the permission "luckperms.autoop" will automatically be granted
|
||||
# server operator status. This permission can be inherited, or set on specific servers/worlds,
|
||||
# temporarily, etc.
|
||||
# - Additionally, setting this to true will force the "enable-ops" option above to false. All users
|
||||
# will be de-opped unless they have the permission node, and the op/deop commands will be
|
||||
# disabled.
|
||||
# - It is recommended that you use this option instead of assigning a single '*' permission.
|
||||
auto-op: false
|
||||
|
||||
# Defines if "opped" players should be able to use all LuckPerms commands by default.
|
||||
#
|
||||
# - Set to false to only allow users who have the permissions access to the commands
|
||||
commands-allow-op: true
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | Vault integration settings | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# If Vault lookups for offline players on the main server thread should be enabled.
|
||||
#
|
||||
# LuckPerms has a "catch" for plugins attempting to perform unsafe offline player data lookups
|
||||
# from the main server thread. This catch raises an exception (causes an error to occur) when unsafe
|
||||
# lookups are made, instead of allowing the lookup to happen, which would likely cause the server
|
||||
# to lag.
|
||||
#
|
||||
# However, if you're willing to accept the consequences, the catch can be disabled by setting this
|
||||
# option to 'true.
|
||||
vault-unsafe-lookups: false
|
||||
|
||||
# If LuckPerms should use the 'display name' of a group when returning groups in Vault API calls.
|
||||
#
|
||||
# - When this option is set to true, the display name of the group is returned.
|
||||
# - When this option is set to false, the standard name/id of the group is returned.
|
||||
vault-group-use-displaynames: true
|
||||
|
||||
# Controls which group LuckPerms should use for NPC players when handling Vault requests.
|
||||
#
|
||||
# - As NPCs aren't actually real players, LuckPerms does not load any user data for them. This
|
||||
# becomes an issue when plugins want to check for their permissions using Vault.
|
||||
# - As a solution, Vault checks for NPCs fallback to a group, which is defined below.
|
||||
vault-npc-group: default
|
||||
|
||||
# Controls how LuckPerms should consider the OP status of NPC players when handing Vault requests.
|
||||
#
|
||||
# - If you want NPCs to have the same permissions as "normal" players, set this option to false.
|
||||
# - If you want NPCs to have OP status, set this option to true.
|
||||
vault-npc-op-status: false
|
||||
|
||||
# If the vault-server option below should be used.
|
||||
#
|
||||
# - When this option is set to false, the server value defined above under "server" is used.
|
||||
use-vault-server: false
|
||||
|
||||
# The name of the server used within Vault operations.
|
||||
#
|
||||
# - If you don't want Vault operations to be server specific, set this to "global".
|
||||
# - Will only take effect if use-vault-server is set to true above.
|
||||
vault-server: global
|
||||
|
||||
# If global permissions should be considered when retrieving meta or player groups
|
||||
vault-include-global: true
|
||||
|
||||
# If Vault operations should ignore any world arguments if supplied.
|
||||
vault-ignore-world: false
|
||||
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
# | Miscellaneous (and rarely used) settings | #
|
||||
# +----------------------------------------------------------------------------------------------+ #
|
||||
|
||||
# If LuckPerms should produce extra logging output when it handles logins.
|
||||
#
|
||||
# - Useful if you're having issues with UUID forwarding or data not being loaded.
|
||||
debug-logins: false
|
||||
|
||||
# If LuckPerms should allow usernames with non alphanumeric characters.
|
||||
#
|
||||
# - Note that due to the design of the storage implementation, usernames must still be 16 characters
|
||||
# or less.
|
||||
allow-invalid-usernames: false
|
||||
|
||||
# If LuckPerms should not require users to confirm bulkupdate operations.
|
||||
#
|
||||
# - When set to true, operations will be executed immediately.
|
||||
# - This is not recommended, as bulkupdate has the potential to irreversibly delete large amounts of
|
||||
# data, and is not designed to be executed automatically.
|
||||
# - If automation is needed, users should prefer using the LuckPerms API.
|
||||
skip-bulkupdate-confirmation: false
|
||||
|
||||
# If LuckPerms should prevent bulkupdate operations.
|
||||
#
|
||||
# - When set to true, bulkupdate operations (the /lp bulkupdate command) will not work.
|
||||
# - When set to false, bulkupdate operations will be allowed via the console.
|
||||
disable-bulkupdate: false
|
||||
|
||||
# If LuckPerms should allow a users primary group to be removed with the 'parent remove' command.
|
||||
#
|
||||
# - When this happens, the plugin will set their primary group back to default.
|
||||
prevent-primary-group-removal: false
|
||||
|
||||
# If LuckPerms should update the list of commands sent to the client when permissions are changed.
|
||||
update-client-command-list: true
|
||||
|
||||
# If LuckPerms should attempt to register "Brigadier" command list data for its commands.
|
||||
register-command-list-data: true
|
||||
|
||||
# If LuckPerms should attempt to resolve Vanilla command target selectors for LP commands.
|
||||
# See here for more info: https://minecraft.gamepedia.com/Commands#Target_selectors
|
||||
resolve-command-selectors: false
|
||||
@@ -1,52 +0,0 @@
|
||||
server_connect_timeout: 5000
|
||||
enforce_secure_profile: false
|
||||
remote_ping_cache: -1
|
||||
forge_support: true
|
||||
player_limit: -1
|
||||
permissions:
|
||||
default:
|
||||
- bungeecord.command.server
|
||||
- bungeecord.command.list
|
||||
admin:
|
||||
- bungeecord.command.alert
|
||||
- bungeecord.command.end
|
||||
- bungeecord.command.ip
|
||||
- bungeecord.command.reload
|
||||
- bungeecord.command.kick
|
||||
timeout: 30000
|
||||
log_commands: false
|
||||
network_compression_threshold: 256
|
||||
online_mode: true
|
||||
disabled_commands:
|
||||
- disabledcommandhere
|
||||
servers:
|
||||
mc:
|
||||
motd: 'Lobby'
|
||||
address: mc:25565
|
||||
restricted: false
|
||||
listeners:
|
||||
- query_port: 25577
|
||||
motd: '&1Another Bungee server'
|
||||
tab_list: GLOBAL_PING
|
||||
query_enabled: false
|
||||
proxy_protocol: false
|
||||
forced_hosts:
|
||||
pvp.md-5.net: pvp
|
||||
ping_passthrough: false
|
||||
priorities:
|
||||
- mc
|
||||
bind_local_address: true
|
||||
host: 0.0.0.0:25577
|
||||
max_players: 1
|
||||
tab_size: 60
|
||||
force_default_server: false
|
||||
ip_forward: false
|
||||
remote_ping_timeout: 5000
|
||||
prevent_proxy_connections: false
|
||||
groups:
|
||||
md_5:
|
||||
- admin
|
||||
connection_throttle: 4000
|
||||
stats: 39440d41-8d83-40cb-a6a7-d95c3197c4d2
|
||||
connection_throttle_limit: 3
|
||||
log_pings: true
|
||||
@@ -1,10 +0,0 @@
|
||||
plugin_channel_name_limit: 128
|
||||
use_netty_dns_resolver: true
|
||||
disable_modern_tab_limiter: true
|
||||
log_initial_handler_connections: true
|
||||
throttling:
|
||||
tab_complete: 1000
|
||||
game_version: ''
|
||||
disable_tab_list_rewrite: true
|
||||
registered_plugin_channels_limit: 128
|
||||
disable_entity_metadata_rewrite: false
|
||||
@@ -1,21 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: FORGE
|
||||
VERSION: "1.15.2"
|
||||
GENERIC_PACK: /modpacks/Valhelsia_2-2.3.4-SERVER.zip
|
||||
MEMORY: "2G"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
healthcheck:
|
||||
test: NONE
|
||||
|
||||
volumes:
|
||||
data: {}
|
||||
@@ -1,27 +0,0 @@
|
||||
version: "3.3"
|
||||
|
||||
services:
|
||||
vanillatweaks_file:
|
||||
restart: "no"
|
||||
image: itzg/minecraft-server
|
||||
ports:
|
||||
- "25565:25565/tcp"
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
VERSION: ${MINECRAFT_VERSION:-LATEST}
|
||||
VANILLATWEAKS_FILE: /config/vanillatweaks-datapacks.json
|
||||
REMOVE_OLD_VANILLATWEAKS: "TRUE"
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./vanillatweaks-datapacks.json:/config/vanillatweaks-datapacks.json:ro
|
||||
vanillatweaks_sharecode:
|
||||
# port is set to 25566 to not conflict with vanillatweaks_file example
|
||||
ports:
|
||||
- "25566:25565/tcp"
|
||||
restart: "no"
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
VERSION: ${MINECRAFT_VERSION:-LATEST}
|
||||
VANILLATWEAKS_SHARECODE: MGr52E
|
||||
REMOVE_OLD_VANILLATWEAKS: "TRUE"
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"version": "1.18",
|
||||
"packs": {
|
||||
"survival": [
|
||||
"graves",
|
||||
"multiplayer sleep",
|
||||
"afk display",
|
||||
"armor statues",
|
||||
"unlock all recipes",
|
||||
"fast leaf decay",
|
||||
"coordinates hud"
|
||||
],
|
||||
"items": ["armored elytra"]
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
current_uptime() {
|
||||
awk '{print $1}' /proc/uptime | cut -d . -f 1
|
||||
}
|
||||
|
||||
java_running() {
|
||||
[[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]]
|
||||
}
|
||||
|
||||
java_process_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'java')" ]]
|
||||
}
|
||||
|
||||
rcon_client_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'rcon-cli')" ]]
|
||||
}
|
||||
|
||||
mc_server_listening() {
|
||||
mc-monitor status --host localhost --port "$SERVER_PORT" --timeout 10s >& /dev/null
|
||||
}
|
||||
|
||||
java_clients_connections() {
|
||||
local connections
|
||||
if java_running ; then
|
||||
connections=$(mc-monitor status --host localhost --port "$SERVER_PORT" --show-player-count)
|
||||
else
|
||||
connections=0
|
||||
fi
|
||||
echo $connections
|
||||
}
|
||||
|
||||
java_clients_connected() {
|
||||
(( $(java_clients_connections) > 0 ))
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# needed for the clients connected function residing in autopause
|
||||
. /auto/autopause-fcns.sh
|
||||
|
||||
# shellcheck source=../../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
if isTrue "${DEBUG_AUTOSTOP}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# wait for java process to be started
|
||||
while :
|
||||
do
|
||||
if java_process_exists ; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
STATE=INIT
|
||||
|
||||
while :
|
||||
do
|
||||
isTrue "${DEBUG_AUTOSTOP}" && log "DEBUG: autostop state = $STATE"
|
||||
case X$STATE in
|
||||
XINIT)
|
||||
# Server startup
|
||||
if mc_server_listening ; then
|
||||
TIME_THRESH=$(($(current_uptime)+AUTOSTOP_TIMEOUT_INIT))
|
||||
logAutostop "MC Server listening for connections - stopping in $AUTOSTOP_TIMEOUT_INIT seconds"
|
||||
STATE=II
|
||||
fi
|
||||
;;
|
||||
XII)
|
||||
# Initial idle
|
||||
if java_clients_connected ; then
|
||||
logAutostop "Client connected - waiting for disconnect"
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutostop "No client connected since startup - stopping server"
|
||||
/auto/stop.sh
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
XE)
|
||||
# Established
|
||||
if ! java_clients_connected ; then
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOSTOP_TIMEOUT_EST))
|
||||
logAutostop "All clients disconnected - stopping in $AUTOSTOP_TIMEOUT_EST seconds"
|
||||
STATE=I
|
||||
fi
|
||||
;;
|
||||
XI)
|
||||
# Idle
|
||||
if java_clients_connected ; then
|
||||
logAutostop "Client reconnected - waiting for disconnect"
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutostop "No client reconnected - stopping"
|
||||
/auto/stop.sh
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
logAutostop "Error: invalid state: $STATE"
|
||||
;;
|
||||
esac
|
||||
sleep $AUTOSTOP_PERIOD
|
||||
done
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
|
||||
logAutopauseAction "Knocked from $1, resuming Java process"
|
||||
echo "$1" > /var/log/knocked-source
|
||||
pkill -CONT java
|
||||
|
||||
# remove .paused file from data directory
|
||||
rm -f /data/.paused
|
||||
fi
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
if isTrue "${DEBUG_AUTOSTOP}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
logAutostopAction "Stopping Java process"
|
||||
if isTrue "${AUTOSTOP_PKILL_USE_SUDO:-false}"; then
|
||||
sudo pkill -f --signal SIGTERM mc-server-runner
|
||||
else
|
||||
pkill -f --signal SIGTERM mc-server-runner
|
||||
fi
|
||||
@@ -1,12 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /auto/autopause-fcns.sh
|
||||
. /autopause/autopause-fcns.sh
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
# shellcheck source=../../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
autopause_error_loop() {
|
||||
logAutopause "Available interfaces within the docker container:"
|
||||
@@ -42,12 +39,7 @@ if ! [[ -d "/sys/class/net/$AUTOPAUSE_KNOCK_INTERFACE" ]] ; then
|
||||
autopause_error_loop
|
||||
fi
|
||||
|
||||
knockdArgs=(-c /tmp/knockd-config.cfg -d -i "$AUTOPAUSE_KNOCK_INTERFACE")
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
knockdArgs+=(-D)
|
||||
fi
|
||||
|
||||
sudo /usr/sbin/knockd "${knockdArgs[@]}"
|
||||
sudo /usr/sbin/knockd -c /tmp/knockd-config.cfg -d -i "$AUTOPAUSE_KNOCK_INTERFACE"
|
||||
if [ $? -ne 0 ] ; then
|
||||
logAutopause "Failed to start knockd daemon."
|
||||
logAutopause "Probable cause: Unable to attach to interface \"$AUTOPAUSE_KNOCK_INTERFACE\"."
|
||||
@@ -58,13 +50,12 @@ STATE=INIT
|
||||
|
||||
while :
|
||||
do
|
||||
isTrue "${DEBUG_AUTOPAUSE}" && log "DEBUG: autopause state = $STATE"
|
||||
case X$STATE in
|
||||
XINIT)
|
||||
# Server startup
|
||||
if mc_server_listening ; then
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_INIT))
|
||||
logAutopause "MC Server listening for connections - pausing in $AUTOPAUSE_TIMEOUT_INIT seconds"
|
||||
logAutopause "MC Server listening for connections - stopping in $AUTOPAUSE_TIMEOUT_INIT seconds"
|
||||
STATE=K
|
||||
fi
|
||||
;;
|
||||
@@ -75,8 +66,8 @@ do
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutopause "No client connected since startup / knocked - pausing"
|
||||
/auto/pause.sh
|
||||
logAutopause "No client connected since startup / knocked - stopping"
|
||||
/autopause/pause.sh
|
||||
STATE=S
|
||||
fi
|
||||
fi
|
||||
@@ -85,7 +76,7 @@ do
|
||||
# Established
|
||||
if ! java_clients_connected ; then
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_EST))
|
||||
logAutopause "All clients disconnected - pausing in $AUTOPAUSE_TIMEOUT_EST seconds"
|
||||
logAutopause "All clients disconnected - stopping in $AUTOPAUSE_TIMEOUT_EST seconds"
|
||||
STATE=I
|
||||
fi
|
||||
;;
|
||||
@@ -96,8 +87,8 @@ do
|
||||
STATE=E
|
||||
else
|
||||
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
|
||||
logAutopause "No client reconnected - pausing"
|
||||
/auto/pause.sh
|
||||
logAutopause "No client reconnected - stopping"
|
||||
/autopause/pause.sh
|
||||
STATE=S
|
||||
fi
|
||||
fi
|
||||
@@ -105,7 +96,7 @@ do
|
||||
XS)
|
||||
# Stopped
|
||||
if rcon_client_exists ; then
|
||||
/auto/resume.sh
|
||||
/autopause/resume.sh
|
||||
fi
|
||||
if java_running ; then
|
||||
if java_clients_connected ; then
|
||||
@@ -113,11 +104,7 @@ do
|
||||
STATE=E
|
||||
else
|
||||
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_KN))
|
||||
from=unknown
|
||||
if [ -e /var/log/knocked-source ]; then
|
||||
from=$(cat /var/log/knocked-source)
|
||||
fi
|
||||
logAutopause "Server was knocked from $from - waiting for clients or timeout"
|
||||
logAutopause "Server was knocked - waiting for clients or timeout"
|
||||
STATE=K
|
||||
fi
|
||||
fi
|
||||
@@ -128,8 +115,8 @@ do
|
||||
esac
|
||||
if [[ "$STATE" == "S" ]] ; then
|
||||
# before rcon times out
|
||||
sleep 5
|
||||
sleep 2
|
||||
else
|
||||
sleep "$AUTOPAUSE_PERIOD"
|
||||
sleep $AUTOPAUSE_PERIOD
|
||||
fi
|
||||
done
|
||||
42
files/autopause/autopause-fcns.sh
Normal file
42
files/autopause/autopause-fcns.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
current_uptime() {
|
||||
echo $(awk '{print $1}' /proc/uptime | cut -d . -f 1)
|
||||
}
|
||||
|
||||
java_running() {
|
||||
[[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]]
|
||||
}
|
||||
|
||||
java_process_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'java')" ]]
|
||||
}
|
||||
|
||||
rcon_client_exists() {
|
||||
[[ -n "$(ps -ax -o comm | grep 'rcon-cli')" ]]
|
||||
}
|
||||
|
||||
mc_server_listening() {
|
||||
[[ -n $(netstat -tln | grep -e "0.0.0.0:$SERVER_PORT" -e ":::$SERVER_PORT" | grep LISTEN) ]]
|
||||
}
|
||||
|
||||
java_clients_connected() {
|
||||
local connections
|
||||
connections=$(netstat -tn | grep ":$SERVER_PORT" | grep ESTABLISHED)
|
||||
if [[ -z "$connections" ]] ; then
|
||||
return 1
|
||||
fi
|
||||
IFS=$'\n'
|
||||
connections=($connections)
|
||||
unset IFS
|
||||
# check that at least one external address is not localhost
|
||||
# remember, that the host network mode does not work with autopause because of the knockd utility
|
||||
for (( i=0; i<${#connections[@]}; i++ ))
|
||||
do
|
||||
if [[ ! $(echo "${connections[$i]}" | awk '{print $5}') =~ ^localhost$|^127(?:\.[0-9]+){0,2}\.[0-9]+$|^(?:0*\:)*?:?0*1$ ]] ; then
|
||||
# not localhost
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
@@ -3,13 +3,10 @@
|
||||
[unpauseMCServer-server]
|
||||
sequence = 25565
|
||||
seq_timeout = 1
|
||||
command = /auto/resume.sh %IP%
|
||||
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh
|
||||
tcpflags = syn
|
||||
[unpauseMCServer-rcon]
|
||||
sequence = 25575
|
||||
seq_timeout = 1
|
||||
command = /auto/resume.sh %IP%
|
||||
command = /usr/sbin/gosu minecraft:minecraft /autopause/resume.sh
|
||||
tcpflags = syn
|
||||
[unpauseMCServer-bedrock]
|
||||
sequence = 19132:udp
|
||||
command = /auto/resume.sh %IP%
|
||||
6
files/auto/pause.sh → files/autopause/pause.sh
Normal file → Executable file
6
files/auto/pause.sh → files/autopause/pause.sh
Normal file → Executable file
@@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
if isTrue "${DEBUG_AUTOPAUSE}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] ; then
|
||||
# save world
|
||||
@@ -21,7 +18,4 @@ if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^S.*$ ]] ; t
|
||||
# finally pause the process
|
||||
logAutopauseAction "Pausing Java process"
|
||||
pkill -STOP java
|
||||
|
||||
# create .paused file in data directory
|
||||
touch /data/.paused
|
||||
fi
|
||||
8
files/autopause/resume.sh
Executable file
8
files/autopause/resume.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
. /start-utils
|
||||
|
||||
if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
|
||||
logAutopauseAction "Knocked, resuming Java process"
|
||||
pkill -CONT java
|
||||
fi
|
||||
@@ -1,2 +1,2 @@
|
||||
minecraft ALL=(ALL) NOPASSWD:/usr/bin/pkill
|
||||
minecraft ALL=(ALL) NOPASSWD:/usr/sbin/knockd
|
||||
%minecraft ALL=(ALL) NOPASSWD:/usr/bin/pkill
|
||||
%minecraft ALL=(ALL) NOPASSWD:/usr/sbin/knockd
|
||||
|
||||
8
bin/mc-health → health.sh
Executable file → Normal file
8
bin/mc-health → health.sh
Executable file → Normal file
@@ -1,10 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=../scripts/start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
if [ -f /data/.mc-health.env ]; then
|
||||
. /data/.mc-health.env
|
||||
fi
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
|
||||
if isTrue "${DISABLE_HEALTHCHECK}"; then
|
||||
echo "Healthcheck disabled"
|
||||
@@ -13,6 +9,6 @@ elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' |
|
||||
echo "Java process suspended by Autopause function"
|
||||
exit 0
|
||||
else
|
||||
mc-monitor status "${MC_HEALTH_EXTRA_ARGS[@]}" --host localhost --port "${SERVER_PORT:-25565}"
|
||||
mc-monitor status --host localhost --port $SERVER_PORT
|
||||
exit $?
|
||||
fi
|
||||
@@ -1,22 +0,0 @@
|
||||
This directory provides a base to use with [kubectl kustomize](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/).
|
||||
|
||||
## Example overlay content
|
||||
|
||||
### kustomization.yml
|
||||
```yaml
|
||||
nameSuffix: "-forge"
|
||||
commonLabels:
|
||||
server: forge
|
||||
bases:
|
||||
- https://github.com/itzg/docker-minecraft-server.git/kustomize/base
|
||||
configMapGenerator:
|
||||
- name: mc
|
||||
envs:
|
||||
- mc.env
|
||||
```
|
||||
|
||||
### mc.env
|
||||
```
|
||||
EULA=true
|
||||
TYPE=FORGE
|
||||
```
|
||||
@@ -1,3 +0,0 @@
|
||||
resources:
|
||||
- statefulset.yml
|
||||
- service.yml
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
service: mc
|
||||
annotations: {}
|
||||
# Such as
|
||||
# mc-router.itzg.me/externalServerName: $(EXTERNAL_SERVICE_NAME)
|
||||
name: mc
|
||||
spec:
|
||||
ports:
|
||||
- name: minecraft
|
||||
port: 25565
|
||||
targetPort: 25565
|
||||
type: NodePort
|
||||
selector:
|
||||
server: mc
|
||||
@@ -1,51 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mc
|
||||
spec:
|
||||
replicas: 1
|
||||
serviceName: mc
|
||||
selector:
|
||||
matchLabels:
|
||||
server: mc
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
server: mc
|
||||
spec:
|
||||
containers:
|
||||
- name: mc
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: mc
|
||||
optional: true
|
||||
env: []
|
||||
image: itzg/minecraft-server
|
||||
stdin: true
|
||||
tty: true
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 150m
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["mc-health"]
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 60
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["mc-health"]
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
failureThreshold: 12
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 500Mi
|
||||
@@ -4,22 +4,19 @@
|
||||
<Console name="SysOut" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
</Console>
|
||||
<Queue name="TerminalConsole">
|
||||
<Queue name="ServerGuiConsole">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
|
||||
</Queue>
|
||||
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
|
||||
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
|
||||
<Policies>
|
||||
<!-- Based on filePattern resolution, so daily -->
|
||||
<TimeBasedTriggeringPolicy />
|
||||
<SizeBasedTriggeringPolicy size="100 MB" />
|
||||
<OnStartupTriggeringPolicy />
|
||||
</Policies>
|
||||
<DefaultRolloverStrategy>
|
||||
<Delete basePath="logs">
|
||||
<IfFileName glob="*.log.gz" />
|
||||
<IfLastModified age="7d" />
|
||||
<IfAccumulatedFileCount exceeds="20"/>
|
||||
</Delete>
|
||||
</DefaultRolloverStrategy>
|
||||
</RollingRandomAccessFile>
|
||||
@@ -31,7 +28,7 @@
|
||||
</filters>
|
||||
<AppenderRef ref="SysOut"/>
|
||||
<AppenderRef ref="File"/>
|
||||
<AppenderRef ref="TerminalConsole"/>
|
||||
<AppenderRef ref="ServerGuiConsole"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
4
minecraft-server/README.md
Normal file
4
minecraft-server/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Moved to top-level
|
||||
|
||||
The contents of this directory have now been moved to the top level of
|
||||
[itzg/docker-minecraft-server](https://github.com/itzg/docker-minecraft-server).
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
: "${SERVER_PORT:=25565}"
|
||||
: "${ENABLE_AUTOSTOP:=false}"
|
||||
: "${AUTOSTOP_TIMEOUT_EST:=3600}"
|
||||
: "${AUTOSTOP_TIMEOUT_INIT:=1800}"
|
||||
: "${AUTOSTOP_PERIOD:=10}"
|
||||
: "${DEBUG_AUTOSTOP:=false}"
|
||||
export SERVER_PORT
|
||||
export ENABLE_AUTOSTOP
|
||||
export AUTOSTOP_TIMEOUT_EST
|
||||
export AUTOSTOP_TIMEOUT_INIT
|
||||
export AUTOSTOP_PERIOD
|
||||
export DEBUG_AUTOSTOP
|
||||
|
||||
log "Autostop functionality enabled"
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
if ! [[ $AUTOSTOP_PERIOD =~ ^[0-9]+$ ]]; then
|
||||
AUTOSTOP_PERIOD=10
|
||||
export AUTOSTOP_PERIOD
|
||||
log "Warning: AUTOSTOP_PERIOD is not numeric, set to 10 (seconds)"
|
||||
fi
|
||||
if [ "$AUTOSTOP_PERIOD" -eq "0" ] ; then
|
||||
AUTOSTOP_PERIOD=10
|
||||
export AUTOSTOP_PERIOD
|
||||
log "Warning: AUTOSTOP_PERIOD must not be 0, set to 10 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOSTOP_TIMEOUT_EST =~ ^[0-9]+$ ]] ; then
|
||||
AUTOSTOP_TIMEOUT_EST=3600
|
||||
export AUTOSTOP_TIMEOUT_EST
|
||||
log "Warning: AUTOSTOP_TIMEOUT_EST is not numeric, set to 3600 (seconds)"
|
||||
fi
|
||||
if ! [[ $AUTOSTOP_TIMEOUT_INIT =~ ^[0-9]+$ ]] ; then
|
||||
AUTOSTOP_TIMEOUT_INIT=1800
|
||||
export AUTOSTOP_TIMEOUT_INIT
|
||||
log "Warning: AUTOSTOP_TIMEOUT_INIT is not numeric, set to 1800 (seconds)"
|
||||
fi
|
||||
|
||||
/auto/autostop-daemon.sh &
|
||||
@@ -1,266 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
: "${EULA:=}"
|
||||
: "${PROXY:=}"
|
||||
: "${ENABLE_AUTOPAUSE:=false}"
|
||||
: "${ENABLE_AUTOSTOP:=false}"
|
||||
: "${RCON_CMDS_STARTUP:=}"
|
||||
: "${RCON_CMDS_ON_CONNECT:=}"
|
||||
: "${RCON_CMDS_ON_DISCONNECT:=}"
|
||||
: "${RCON_CMDS_FIRST_CONNECT:=}"
|
||||
: "${RCON_CMDS_LAST_DISCONNECT:=}"
|
||||
: "${RCON_CMDS_PERIOD:=10}"
|
||||
: "${RCON_PASSWORD_FILE:=}"
|
||||
: "${ENABLE_RCON:=true}"
|
||||
: "${RCON_PASSWORD:=minecraft}"
|
||||
: "${RCON_PORT:=25575}"
|
||||
export ENABLE_RCON RCON_PASSWORD RCON_PORT
|
||||
|
||||
: "${MEMORY=1G}"
|
||||
: "${INIT_MEMORY=${MEMORY}}"
|
||||
: "${MAX_MEMORY=${MEMORY}}"
|
||||
export MEMORY INIT_MEMORY MAX_MEMORY
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
#umask 002
|
||||
export HOME=/data
|
||||
|
||||
log "Running as uid=$(id -u) gid=$(id -g) with /data as '$(ls -lnd /data)'"
|
||||
|
||||
if [ ! -e /data/eula.txt ]; then
|
||||
if ! isTrue "$EULA"; then
|
||||
log ""
|
||||
log "Please accept the Minecraft EULA at"
|
||||
log " https://account.mojang.com/documents/minecraft_eula"
|
||||
log "by adding the following immediately after 'docker run':"
|
||||
log " -e EULA=TRUE"
|
||||
log ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
writeEula
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${EXEC_DIRECTLY:-false}"; then
|
||||
log "EXEC_DIRECTLY=true is incompatible with ENABLE_AUTOPAUSE=true"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
log "ENABLE_AUTOPAUSE=true is incompatible with ENABLE_AUTOSTOP=true"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $PROXY ]]; then
|
||||
export http_proxy="$PROXY"
|
||||
export https_proxy="$PROXY"
|
||||
export JAVA_TOOL_OPTIONS+="-Djava.net.useSystemProxies=true"
|
||||
log "INFO: Giving proxy time to startup..."
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
if [[ $RCON_PASSWORD_FILE ]]; then
|
||||
log ""
|
||||
if [ ! -e ${RCON_PASSWORD_FILE} ]; then
|
||||
log "Initial RCON password file ${RCON_PASSWORD_FILE} does not seems to exist."
|
||||
log "Please ensure your configuration."
|
||||
log "If you are using Docker Secrets feature, please check this for further information: "
|
||||
log " https://docs.docker.com/engine/swarm/secrets"
|
||||
log ""
|
||||
exit 1
|
||||
else
|
||||
RCON_PASSWORD=$(cat ${RCON_PASSWORD_FILE})
|
||||
export RCON_PASSWORD
|
||||
fi
|
||||
log ""
|
||||
fi
|
||||
|
||||
function fixJavaPath() {
|
||||
# Some Docker management UIs grab all the image declared variables and present them for configuration.
|
||||
# When upgrading images across Java versions, that creates a mismatch in PATH's expected by base image.
|
||||
if ! which java > /dev/null; then
|
||||
log "ERROR: your Docker provider has an annoying flaw where it"
|
||||
log " tries to set PATH even though the container establishes"
|
||||
log " a very specific value."
|
||||
sleep 2
|
||||
# now find where java might be
|
||||
for d in /opt/java/openjdk/bin /usr/bin; do
|
||||
if [ -x "${d}/java" ]; then
|
||||
PATH="${PATH}:${d}"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if ! fixJavaPath; then
|
||||
log "ERROR: could not locate path that contains java"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
|
||||
|
||||
case "X$VERSION" in
|
||||
X|XLATEST|Xlatest)
|
||||
if ! VANILLA_VERSION=$(get --json-path '$.latest.release' "$VERSIONS_JSON"); then
|
||||
log "ERROR: version lookup failed: $VANILLA_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
XSNAPSHOT|Xsnapshot)
|
||||
if ! VANILLA_VERSION=$(get --json-path '$.latest.snapshot' "$VERSIONS_JSON"); then
|
||||
log "ERROR: version lookup failed: $VANILLA_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
VANILLA_VERSION=$VERSION
|
||||
;;
|
||||
esac
|
||||
export VANILLA_VERSION
|
||||
MAJOR_VANILLA_VERSION=$(get_major_version "$VANILLA_VERSION")
|
||||
export MAJOR_VANILLA_VERSION
|
||||
log "Resolved version given ${VERSION} into ${VANILLA_VERSION} and major version ${MAJOR_VANILLA_VERSION}"
|
||||
|
||||
cd /data || exit 1
|
||||
|
||||
export ORIGINAL_TYPE=${TYPE^^}
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
||||
${SCRIPTS:-/}start-autopause
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
${SCRIPTS:-/}start-autostop
|
||||
fi
|
||||
|
||||
if
|
||||
[[ "$RCON_CMDS_STARTUP" ]] ||
|
||||
[[ "$RCON_CMDS_ON_CONNECT" ]] ||
|
||||
[[ "$RCON_CMDS_ON_DISCONNECT" ]] ||
|
||||
[[ "$RCON_CMDS_FIRST_CONNECT" ]] ||
|
||||
[[ "$RCON_CMDS_LAST_DISCONNECT" ]]
|
||||
then
|
||||
log "Starting RCON commands"
|
||||
# shellcheck source=start-rconcmds
|
||||
${SCRIPTS:-/}start-rconcmds
|
||||
fi
|
||||
|
||||
if versionLessThan 1.7; then
|
||||
echo "
|
||||
MC_HEALTH_EXTRA_ARGS=(
|
||||
--use-server-list-ping
|
||||
)
|
||||
" > /data/.mc-health.env
|
||||
fi
|
||||
|
||||
log "Resolving type given ${TYPE}"
|
||||
case "${TYPE^^}" in
|
||||
*BUKKIT|SPIGOT)
|
||||
exec "${SCRIPTS:-/}start-deployBukkitSpigot" "$@"
|
||||
;;
|
||||
|
||||
PAPER)
|
||||
exec "${SCRIPTS:-/}start-deployPaper" "$@"
|
||||
;;
|
||||
|
||||
FORGE)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployForge" "$@"
|
||||
;;
|
||||
|
||||
FABRIC)
|
||||
exec "${SCRIPTS:-/}start-deployFabric" "$@"
|
||||
;;
|
||||
|
||||
QUILT)
|
||||
exec "${SCRIPTS:-/}start-deployQuilt" "$@"
|
||||
;;
|
||||
|
||||
FTBA)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployFTBA" "$@"
|
||||
;;
|
||||
|
||||
FTB|CURSEFORGE)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployCF" "$@"
|
||||
;;
|
||||
|
||||
VANILLA)
|
||||
exec "${SCRIPTS:-/}start-deployVanilla" "$@"
|
||||
;;
|
||||
|
||||
SPONGEVANILLA)
|
||||
exec "${SCRIPTS:-/}start-deploySpongeVanilla" "$@"
|
||||
;;
|
||||
|
||||
CUSTOM)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployCustom" "$@"
|
||||
;;
|
||||
|
||||
MAGMA)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployMagma" "$@"
|
||||
;;
|
||||
|
||||
MOHIST)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployMohist" "$@"
|
||||
;;
|
||||
|
||||
CATSERVER)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployCatserver" "$@"
|
||||
;;
|
||||
|
||||
LOLISERVER)
|
||||
evaluateJavaCompatibilityForForge
|
||||
exec "${SCRIPTS:-/}start-deployLoliserver" "$@"
|
||||
;;
|
||||
|
||||
PURPUR)
|
||||
exec "${SCRIPTS:-/}start-deployPurpur" "$@"
|
||||
;;
|
||||
|
||||
PUFFERFISH)
|
||||
exec "${SCRIPTS:-/}start-deployPufferfish" "$@"
|
||||
;;
|
||||
|
||||
CANYON)
|
||||
exec "${SCRIPTS:-/}start-deployCanyon" "$@"
|
||||
;;
|
||||
|
||||
LIMBO)
|
||||
exec "${SCRIPTS:-/}start-deployLimbo" "$@"
|
||||
;;
|
||||
|
||||
CRUCIBLE)
|
||||
log "**********************************************************************"
|
||||
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||
log " since some mods require Java 8"
|
||||
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
||||
log " can be fixed with java8"
|
||||
log "**********************************************************************"
|
||||
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
log "Invalid type: '$TYPE'"
|
||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||
log " CURSEFORGE, SPONGEVANILLA, PURPUR, CUSTOM,"
|
||||
log " MAGMA, MOHIST, CATSERVER, LOLISERVER, AIRPLANE, PUFFERFISH, CANYON, LIMBO, CRUCIBLE"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
@@ -1,248 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
loadForgeVars() {
|
||||
cfgFile=${1?}
|
||||
pat='^([^#;][^=]+)=[:space:]*([^;]*)'
|
||||
while read -r line || [[ -n "$line" ]] ; do
|
||||
if [[ $line =~ $pat ]]; then
|
||||
#echo "MATCHED $line"
|
||||
k=${BASH_REMATCH[1]}
|
||||
v=${BASH_REMATCH[2]}
|
||||
case $k in
|
||||
FORGEURL)
|
||||
forgeInstallerUrl="$v"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done < "$cfgFile"
|
||||
}
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
: "${FTB_BASE_DIR:=${CF_BASE_DIR:-/data/FeedTheBeast}}"
|
||||
export FTB_BASE_DIR
|
||||
|
||||
legacyJavaFixerUrl=https://files.minecraftforge.net/maven/net/minecraftforge/lex/legacyjavafixer/1.0/legacyjavafixer-1.0.jar
|
||||
export TYPE=CURSEFORGE
|
||||
|
||||
FTB_SERVER_MOD=${FTB_SERVER_MOD:-$CF_SERVER_MOD}
|
||||
|
||||
log "Looking for Feed-The-Beast / CurseForge server modpack."
|
||||
if [[ ! $FTB_SERVER_MOD ]]; then
|
||||
log "ERROR: CF_SERVER_MOD or FTB_SERVER_MOD is required to be set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
downloadModpack() {
|
||||
srv_modpack=${FTB_SERVER_MOD}
|
||||
if isURL "${srv_modpack}"; then
|
||||
log "Downloading modpack from ${srv_modpack}..."
|
||||
if ! srv_modpack=$(get -o /data --output-filename --skip-existing "${srv_modpack}"); then
|
||||
log "ERROR: failed to download modpack"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [[ "${srv_modpack:0:5}" == "data/" ]]; then
|
||||
# Prepend with "/"
|
||||
srv_modpack="/${srv_modpack}"
|
||||
fi
|
||||
if [[ ! "${srv_modpack:0:1}" == "/" ]]; then
|
||||
# If not an absolute path, assume file is in "/data"
|
||||
srv_modpack=/data/${srv_modpack}
|
||||
fi
|
||||
if [[ ! -f "${srv_modpack}" ]]; then
|
||||
log "FTB server modpack ${srv_modpack} not found."
|
||||
exit 2
|
||||
fi
|
||||
if [[ ! "${srv_modpack: -4}" == ".zip" ]]; then
|
||||
log "FTB server modpack ${srv_modpack} is not a zip archive."
|
||||
log "Please set FTB_SERVER_MOD to a file with a .zip extension."
|
||||
exit 2
|
||||
fi
|
||||
FTB_SERVER_MOD=${srv_modpack}
|
||||
}
|
||||
|
||||
if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
|
||||
downloadModpack
|
||||
|
||||
needsInstall=true
|
||||
installMarker=/data/.curseforge-installed
|
||||
if [ -f $installMarker ]; then
|
||||
if [ "$(cat $installMarker)" != "${FTB_SERVER_MOD}" ]; then
|
||||
log "Upgrading modpack"
|
||||
|
||||
serverJar=$(find "${FTB_BASE_DIR}" -type f \( -path "*/libraries/*" -o -path "*/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ "${serverJar}" ]]; then
|
||||
rm -rf "$(dirname "${serverJar}")"/{mods,*.jar,libraries,resources,scripts,config}
|
||||
fi
|
||||
else
|
||||
needsInstall=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if $needsInstall; then
|
||||
log "Unpacking FTB server modpack ${FTB_SERVER_MOD} ..."
|
||||
mkdir -p "${FTB_BASE_DIR}"
|
||||
unzip -o "${FTB_SERVER_MOD}" -d "${FTB_BASE_DIR}" | awk '{printf "."} END {print ""}'
|
||||
|
||||
serverJar=$(find "${FTB_BASE_DIR}" -type f \( -path "*/libraries/*" -o -path "*/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ -z "$serverJar" ]]; then
|
||||
|
||||
if [ -f "${FTB_BASE_DIR}/settings.cfg" ]; then
|
||||
loadForgeVars "${FTB_BASE_DIR}/settings.cfg"
|
||||
|
||||
if [[ $forgeInstallerUrl ]]; then
|
||||
forgeInstallerJar="${FTB_BASE_DIR}/forge-installer.jar"
|
||||
if ! curl -fsSL -o "$forgeInstallerJar" "$forgeInstallerUrl" ; then
|
||||
log "ERROR failed to download Forge installer from $forgeInstallerUrl"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
else
|
||||
forgeInstallerJar=$(find "${FTB_BASE_DIR}" -name "forge*installer.jar")
|
||||
fi
|
||||
|
||||
if [[ -z "${forgeInstallerJar}" ]]; then
|
||||
log "ERROR Unable to find forge installer in modpack"
|
||||
log " or download using modpack config."
|
||||
log " Make sure you downloaded the server files."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
log "Installing forge server"
|
||||
dirOfInstaller=$(dirname "${forgeInstallerJar}")
|
||||
(cd "${dirOfInstaller}"; java -jar "$(basename "${forgeInstallerJar}")" --installServer)
|
||||
fi
|
||||
|
||||
echo "${FTB_SERVER_MOD}" > $installMarker
|
||||
fi
|
||||
|
||||
SERVER=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "/libraries/*" -o -path "/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then
|
||||
log "ERROR unable to locate installed forge server jar"
|
||||
isDebugging && find "${FTB_BASE_DIR}" -name "forge*.jar"
|
||||
exit 2
|
||||
fi
|
||||
export SERVER
|
||||
|
||||
FTB_DIR=$(dirname "${SERVER}")
|
||||
export FTB_DIR
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
fi
|
||||
|
||||
|
||||
findStartScript() {
|
||||
entryScriptExpr=(
|
||||
-name ServerStart.sh
|
||||
-o -name serverstart.sh
|
||||
-o -name ServerStartLinux.sh
|
||||
-o -name LaunchServer.sh
|
||||
-o -name server-start.sh
|
||||
-o -name SERVER-START.sh
|
||||
-o -name start-server.sh
|
||||
-o -name startserver.sh
|
||||
-o -name StartServer.sh
|
||||
-o -name run.sh
|
||||
-o -name start.sh
|
||||
-o -name launch.sh
|
||||
)
|
||||
|
||||
if [ -d "${FTB_BASE_DIR}" ]; then
|
||||
find "${FTB_BASE_DIR}" \( "${entryScriptExpr[@]}" \) -print -quit
|
||||
fi
|
||||
}
|
||||
|
||||
startScript=$(findStartScript)
|
||||
|
||||
# only download and install if a mod pack isn't already installed
|
||||
# also check for the start script rather than just the folder
|
||||
# this allows saving just the world separate from the rest of the data directory
|
||||
if [[ ! $startScript ]]; then
|
||||
downloadModpack
|
||||
srv_modpack=${FTB_SERVER_MOD}
|
||||
|
||||
log "Unpacking FTB server modpack ${srv_modpack} ..."
|
||||
mkdir -p "${FTB_BASE_DIR}"
|
||||
unzip -o "${srv_modpack}" -d "${FTB_BASE_DIR}" | awk '{printf "."} END {print ""}'
|
||||
|
||||
installScriptExpr=(
|
||||
-name install.sh
|
||||
-o -name FTBInstall.sh
|
||||
-o -name Install.sh
|
||||
)
|
||||
|
||||
installScript=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( "${installScriptExpr[@]}" \) -print -quit)
|
||||
if [[ "$installScript" ]]; then
|
||||
(
|
||||
cd "$(dirname "${installScript}")"
|
||||
chmod +x "${installScript}"
|
||||
log "Running included $(basename "${installScript}"). This might take a minute or two..."
|
||||
"${installScript}" > install.log
|
||||
)
|
||||
fi
|
||||
|
||||
startScript=$(findStartScript)
|
||||
fi
|
||||
|
||||
# start script provided by unzipped+installed modpack?
|
||||
if [[ ! $startScript ]]; then
|
||||
# no, then look for a forge jar to run
|
||||
|
||||
# Allow up to 2 levels since some modpacks have a top-level directory named for the modpack
|
||||
forgeJar=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "/libraries/*" -o -path "/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ "$forgeJar" ]]; then
|
||||
FTB_BASE_DIR=$(dirname "${forgeJar}")
|
||||
export FTB_BASE_DIR
|
||||
log "No entry script found, so building one for ${forgeJar}"
|
||||
cat > "${FTB_BASE_DIR}/ServerStart.sh" <<EOF
|
||||
#!/bin/sh
|
||||
. ./settings-local.sh
|
||||
java \${JAVA_PARAMETERS} -Xmx\${MAX_RAM} -jar $(basename "${forgeJar}") nogui
|
||||
EOF
|
||||
startScript="${FTB_BASE_DIR}/ServerStart.sh"
|
||||
chmod +x "$startScript"
|
||||
else
|
||||
log "ERROR: Modpack missing start script and unable to find Forge jar to generate one"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Modpacks that use https://github.com/BloodyMods/ServerStarter will sometimes specify an
|
||||
# extra subpath where all the server files get installed. Need to transplant EULA file there.
|
||||
serverSetupConfig=$(find "${FTB_BASE_DIR}" -type f -name server-setup-config.yaml)
|
||||
if [[ $serverSetupConfig && $serverSetupConfig != "~" ]]; then
|
||||
if baseInstallPath=$(mc-image-helper yaml-path --file "$serverSetupConfig" ".install.baseInstallPath"); then
|
||||
resolvedBaseInstallPath="$(dirname "$serverSetupConfig")/${baseInstallPath}"
|
||||
mkdir -p "$resolvedBaseInstallPath"
|
||||
|
||||
cp -n /data/eula.txt "${resolvedBaseInstallPath}/eula.txt"
|
||||
fi
|
||||
fi
|
||||
|
||||
FTB_SERVER_START="$startScript"
|
||||
export FTB_SERVER_START
|
||||
|
||||
FTB_DIR=$(dirname "${FTB_SERVER_START}")
|
||||
export FTB_DIR
|
||||
chmod a+x "${FTB_SERVER_START}"
|
||||
grep fml.queryResult=confirm "${FTB_SERVER_START}" > /dev/null || \
|
||||
sed -i 's/-jar/-Dfml.queryResult=confirm -jar/' "${FTB_SERVER_START}"
|
||||
sed -i 's/.*read.*Restart now/#\0/' "${FTB_SERVER_START}"
|
||||
legacyJavaFixerPath="${FTB_DIR}/mods/legacyjavafixer.jar"
|
||||
|
||||
if isTrue "${FTB_LEGACYJAVAFIXER}" && [ ! -e "${legacyJavaFixerPath}" ]; then
|
||||
log "Installing legacy java fixer to ${legacyJavaFixerPath}"
|
||||
if ! get -o "${legacyJavaFixerPath}" ${legacyJavaFixerUrl}; then
|
||||
log "ERROR failed to download legacy java fixer from ${legacyJavaFixerUrl}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export FAMILY=FORGE
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
@@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
requireVar VANILLA_VERSION
|
||||
: "${CRUCIBLE_RELEASE:=latest}"
|
||||
|
||||
crucibleReleasesUrl=https://api.github.com/repos/CrucibleMC/Crucible/releases
|
||||
if [[ ${CRUCIBLE_RELEASE^^} = LATEST ]]; then
|
||||
crucibleReleaseUrl=${crucibleReleasesUrl}/latest
|
||||
else
|
||||
crucibleReleaseUrl=${crucibleReleasesUrl}/tags/${CRUCIBLE_RELEASE}
|
||||
fi
|
||||
|
||||
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VANILLA_VERSION}-.*\.jar/)].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $downloadUrl = null ]]; then
|
||||
log "ERROR: failed to locate Crucible jar for $VANILLA_VERSION from ${CRUCIBLE_RELEASE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Crucible from $downloadUrl"
|
||||
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Crucible jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
librariesDir=/data/libraries
|
||||
if [ ! -d "$librariesDir" ]; then
|
||||
if ! librariesUrl=$(get --json-path "$.assets[?(@.name == 'libraries.zip')].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Crucible libraries"
|
||||
if ! get -o /tmp/libraries.zip "$librariesUrl"; then
|
||||
log "ERROR: failed to download Crucible libraries from $librariesUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! unzip /tmp/libraries.zip -d "$librariesDir"; then
|
||||
log "ERROR: failed to unzip Crucible libraries"
|
||||
exit 1
|
||||
fi
|
||||
rm /tmp/libraries.zip
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-$(dirname "$0")}/start-setupWorld" "$@"
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
requireVar VANILLA_VERSION
|
||||
export TYPE=FABRIC
|
||||
: "${FABRIC_LAUNCHER_VERSION:=${FABRIC_INSTALLER_VERSION:-LATEST}}"
|
||||
: "${FABRIC_LAUNCHER:=}"
|
||||
: "${FABRIC_LAUNCHER_URL:=}"
|
||||
: "${FABRIC_LOADER_VERSION:=LATEST}"
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
# Custom fabric jar
|
||||
if [[ $FABRIC_LAUNCHER ]]; then
|
||||
export SERVER=${FABRIC_LAUNCHER}
|
||||
# Custom fabric jar url
|
||||
elif [[ $FABRIC_LAUNCHER_URL ]]; then
|
||||
export SERVER=fabric-server-$(echo -n "$FABRIC_LAUNCHER_URL" | mc-image-helper hash)
|
||||
# Official fabric launcher
|
||||
else
|
||||
if [[ ${FABRIC_LAUNCHER_VERSION^^} = LATEST ]]; then
|
||||
log "Checking Fabric Launcher version information."
|
||||
FABRIC_LAUNCHER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-installer/maven-metadata.xml)
|
||||
fi
|
||||
if [[ ${FABRIC_LOADER_VERSION^^} = LATEST ]]; then
|
||||
log "Checking Fabric Loader version information."
|
||||
FABRIC_LOADER_VERSION=$(maven-metadata-release https://maven.fabricmc.net/net/fabricmc/fabric-loader/maven-metadata.xml)
|
||||
fi
|
||||
export SERVER=fabric-server-mc.${VANILLA_VERSION}-loader.${FABRIC_LOADER_VERSION}-launcher.${FABRIC_LAUNCHER_VERSION}.jar
|
||||
export FABRIC_LAUNCHER_URL="https://meta.fabricmc.net/v2/versions/loader/${VANILLA_VERSION}/${FABRIC_LOADER_VERSION}/${FABRIC_LAUNCHER_VERSION}/server/jar"
|
||||
fi
|
||||
|
||||
if [[ ! -e ${SERVER} && ! -z ${FABRIC_LAUNCHER_URL} ]]; then
|
||||
log "Downloading $FABRIC_LAUNCHER_URL ..."
|
||||
if ! get -o "$SERVER" "$FABRIC_LAUNCHER_URL"; then
|
||||
log "Failed to download from given location $FABRIC_LAUNCHER_URL"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -e ${SERVER} ]]; then
|
||||
log "$SERVER does not exist, cannot launch server!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export FAMILY=FABRIC
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
|
||||
: "${FORGE_FORCE_REINSTALL:=false}}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if ! mc-image-helper install-forge \
|
||||
--output-directory=/data \
|
||||
--results-file=/data/.run-forge.env \
|
||||
--minecraft-version="${VANILLA_VERSION}" \
|
||||
--forge-version="${FORGE_VERSION}" \
|
||||
--force-reinstall="${FORGE_FORCE_REINSTALL}"; then
|
||||
log "ERROR failed to install forge"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# grab SERVER and export it
|
||||
set -a
|
||||
source /data/.run-forge.env
|
||||
set +a
|
||||
|
||||
export FAMILY=FORGE
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
. ${SCRIPTS:-/}start-utils
|
||||
isDebugging && set -x
|
||||
|
||||
: ${LIMBO_BUILD:=LATEST}
|
||||
: ${FORCE_REDOWNLOAD:=false}
|
||||
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
|
||||
: ${LEVEL:=default;${LIMBO_SCHEMA_FILENAME}}
|
||||
# defaults to localhost, if this is not set
|
||||
: ${SERVER_IP:=0.0.0.0}
|
||||
|
||||
export LEVEL SERVER_IP
|
||||
|
||||
if [[ ${LIMBO_BUILD^^} == LATEST ]]; then
|
||||
LIMBO_BUILD=lastStableBuild
|
||||
fi
|
||||
|
||||
baseUrl="https://ci.loohpjames.com/job/Limbo/${LIMBO_BUILD}"
|
||||
buildInfoUrl="${baseUrl}/api/json"
|
||||
buildJson=$(curl -fsSL "${buildInfoUrl}")
|
||||
if [ $? != 0 ]; then
|
||||
log "ERROR failed to get build info from ${buildInfoUrl} (status=$?)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ${LIMBO_BUILD} = lastStableBuild ]]; then
|
||||
LIMBO_BUILD=$(jq -r '.number' <<<${buildJson})
|
||||
log "Resolved latest Limbo build to ${LIMBO_BUILD}"
|
||||
fi
|
||||
artifactPath=$(jq -r '.artifacts[] | select(.fileName|test("^Limbo-")) | .relativePath' <<<${buildJson})
|
||||
defaultSchemaPath=$(jq -r '.artifacts[] | select(.fileName|test(".*\\.schem")) | .relativePath' <<<${buildJson})
|
||||
|
||||
export SERVER="limbo-${LIMBO_BUILD}.jar"
|
||||
|
||||
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||
downloadUrl="${baseUrl}/artifact/${artifactPath}"
|
||||
log "Downloading Limbo from $downloadUrl ..."
|
||||
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ ! -f "${LIMBO_SCHEMA_FILENAME}" ]; then
|
||||
log "Downloading default schem file"
|
||||
if ! curl -o "${LIMBO_SCHEMA_FILENAME}" -fsSL "${baseUrl}/artifact/${defaultSchemaPath}"; then
|
||||
log "ERROR: failed to download schema file $baseUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${LEVEL} != *\;* ]]; then
|
||||
LEVEL="${LEVEL};${LIMBO_SCHEMA_FILENAME}"
|
||||
fi
|
||||
export LEVEL
|
||||
|
||||
export FAMILY=LIMBO
|
||||
exec ${SCRIPTS:-/}start-setupWorld $@
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
|
||||
latestAsset=$(
|
||||
curl -fsSL https://cdn.ci.loliidc.cn:30011/job/LoliServer-1.16.5/lastSuccessfulBuild/artifact/projects/LoliServer/build/libs | \
|
||||
jq '.assets[] | select(.name | match(".*-server.jar"))'
|
||||
)
|
||||
|
||||
if [[ -z "${latestAsset}" ]]; then
|
||||
log "ERROR: latest release of Loliserver is missing server.jar asset"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
isDebugging && log "Latest asset ${latestAsset}"
|
||||
latestJarName=$(echo ${latestAsset} | jq --raw-output '.name')
|
||||
latestJarId=$(echo ${latestAsset} | jq --raw-output '.id')
|
||||
|
||||
|
||||
export SERVER="/data/${latestJarName}"
|
||||
|
||||
if [ ! -f ${SERVER} ]; then
|
||||
log "Downloading ${latestJarName}"
|
||||
curl -H "Accept:application/octet-stream" -o "$SERVER" -fsSL https://cdn.ci.loliidc.cn:30011/job/LoliServer-1.16.5/lastSuccessfulBuild/artifact/projects/LoliServer/build/libs/${latestJarId}
|
||||
fi
|
||||
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
: "${VANILLA_VERSION?}"
|
||||
|
||||
if ! downloadUrl=$(get --json-path '$.link' "https://api.magmafoundation.org/api/v2/${VANILLA_VERSION}/latest"); then
|
||||
log "ERROR failed to locate latest Magma download for ${VANILLA_VERSION}. Is that version supported?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! SERVER=$(get --output-filename --skip-up-to-date --output /data "$downloadUrl"); then
|
||||
log "ERROR: failed to download Magma server jar from $downloadUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
export FAMILY=HYBRID
|
||||
|
||||
exec "${SCRIPTS:-/}start-setupWorld" "$@"
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
|
||||
set -euo pipefail
|
||||
isDebugging && set -x
|
||||
|
||||
IFS=$'\n\t'
|
||||
|
||||
if versionLessThan 1.17; then
|
||||
log "ERROR: Pufferfish server type only supports versions 1.17, 1.18 or 1.19, use PUFFERFISH_BUILD to select the the correct build 47 => 1.18.1, 50 => 1.18.2 etc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
: "${PUFFERFISH_BUILD:=lastSuccessfulBuild}"
|
||||
|
||||
PUFFERFISH_BUILD_JSON=$(curl -X GET -s "https://ci.pufferfish.host/job/Pufferfish-${MAJOR_VANILLA_VERSION}/${PUFFERFISH_BUILD}/api/json")
|
||||
# Example: "url": "https://ci.pufferfish.host/job/Pufferfish-1.18/50/",
|
||||
PUFFERFISH_BUILD_URL=$(jq -n "$PUFFERFISH_BUILD_JSON" | jq -jc '.url // empty' )
|
||||
# Example: "fileName": "pufferfish-paperclip-1.18.2-R0.1-SNAPSHOT-reobf.jar",
|
||||
PUFFERFISH_BUILD_FILENAME=$(jq -n "$PUFFERFISH_BUILD_JSON" | jq -jc '.artifacts[].fileName // empty' )
|
||||
PUFFERFISH_BUILD_DOWNLOAD_URL="${PUFFERFISH_BUILD_URL}artifact/build/libs/${PUFFERFISH_BUILD_FILENAME}"
|
||||
|
||||
# Setting server to the Jar filename for export.
|
||||
export SERVER=$PUFFERFISH_BUILD_FILENAME
|
||||
|
||||
log "Removing old Pufferfish versions ..."
|
||||
shopt -s nullglob
|
||||
for f in pufferfish-*.jar; do
|
||||
[[ $f != "$SERVER" ]] && rm "$f"
|
||||
done
|
||||
|
||||
if [[ ! -f "$SERVER" ]] || isTrue "${FORCE_REDOWNLOAD:-false}"; then
|
||||
log "Downloading Pufferfish from $PUFFERFISH_BUILD_DOWNLOAD_URL ..."
|
||||
if ! get -o "$SERVER" "$PUFFERFISH_BUILD_DOWNLOAD_URL"; then
|
||||
log "ERROR: failed to download from $PUFFERFISH_BUILD_DOWNLOAD_URL (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
: "${PURPUR_DOWNLOAD_URL:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-/}start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if [[ $PURPUR_DOWNLOAD_URL ]]; then
|
||||
export SERVER=$(getFilenameFromUrl "${PURPUR_DOWNLOAD_URL}")
|
||||
|
||||
if [ -f "$SERVER" ]; then
|
||||
zarg=(-z "$SERVER")
|
||||
fi
|
||||
|
||||
echo "Preparing custom Purpur jar from $PURPUR_DOWNLOAD_URL"
|
||||
|
||||
curl -fsSL -o "$SERVER" "${zarg[@]}" "${PURPUR_DOWNLOAD_URL}"
|
||||
else
|
||||
: "${VANILLA_VERSION:?}"
|
||||
: "${PURPUR_BUILD:=LATEST}"
|
||||
: "${FORCE_REDOWNLOAD:=false}"
|
||||
|
||||
if [[ ${PURPUR_BUILD} == LATEST ]]; then
|
||||
if ! PURPUR_BUILD=$(get --json-path=".builds.latest" "https://api.purpurmc.org/v2/purpur/${VANILLA_VERSION}"); then
|
||||
log "ERROR: Failed to locate a Purpur build for ${VANILLA_VERSION}."
|
||||
log " Please check if a download is available at https://purpur.pl3x.net/downloads/"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export SERVER="purpur-${VANILLA_VERSION}-${PURPUR_BUILD}.jar"
|
||||
|
||||
log "Removing old Purpur versions ..."
|
||||
shopt -s nullglob
|
||||
for f in purpur-*.jar; do
|
||||
[[ $f != "$SERVER" ]] && rm "$f"
|
||||
done
|
||||
|
||||
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||
downloadUrl="https://api.purpurmc.org/v2/purpur/${VANILLA_VERSION}/${PURPUR_BUILD}/download"
|
||||
log "Downloading Purpur from $downloadUrl ..."
|
||||
if ! get -o "$SERVER" "$downloadUrl"; then
|
||||
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||
exit 3
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Normalize on Spigot for later operations
|
||||
export FAMILY=SPIGOT
|
||||
|
||||
exec "${SCRIPTS:-/}start-spiget" "$@"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user