Skip to content

Commit a2a8a30

Browse files
authored
feat!: now read config overrides from /config directory (#304)
BREAKING-CHANGE: overrides config files are no longer taken into account when located under the `/opt/papermc/config/overrides` directory.
1 parent 25789dc commit a2a8a30

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

docs/user-guide/src/configuration-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ They provide a more maintainable and future-proof approach to configuring advanc
1616

1717
All configuration files must be placed in:
1818

19-
/opt/papermc/config/overrides
19+
/config/
2020

2121
You are free to choose any file names that suit your organization.
2222

@@ -53,7 +53,7 @@ We’ll do our best to find a solution!
5353

5454
Suppose you want to disable the End dimension in your PaperMC server.
5555
This would normally require setting the `settings.allow-end` property inside `bukkit.yml`.
56-
Now, you can create any file inside `/opt/papermc/config/overrides` and define the property under the `bukkit.global.settings` key like this:
56+
Now, you can create any file inside `/config/` and define the property under the `bukkit.global.settings` key like this:
5757

5858
```yaml
5959
bukkit:

src/Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,14 @@ RUN apk add --no-cache gettext libudev-zero
118118
COPY --chmod=770 runtime/ ./
119119

120120
# Adjust permissions.
121+
# Set default ones for mount points knowing that they can be overridden at runtime (e.g., Kubernetes's security context "fsGroup").
121122
RUN chmod 770 /opt/papermc && \
122-
chmod 550 /opt/papermc/start.sh
123-
124-
# Prepare data directories by setting proper default permissions.
125-
# Avoid "access denied" errors when the server attempts to create or modify files.
126-
# See https://stackoverflow.com/a/64034092/10165346
127-
RUN mkdir --parent /data/worlds && \
123+
chmod 550 /opt/papermc/start.sh && \
124+
# Overrides config files
125+
mkdir /config && \
126+
chown daemon /config && \
127+
# Data directories
128+
mkdir --parent /data/worlds && \
128129
chown daemon /data/worlds
129130

130131
# mc-monitor setup for health-checks.

src/runtime/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SCRIPT_DIR=$(cd "$(dirname "$0")" > /dev/null 2>&1 && pwd -P)
77
## Directories
88
ROOT_DIR="${SCRIPT_DIR}"
99
CONFIG_DIR="${SCRIPT_DIR}/config"
10-
OVERRIDES_CONFIG_DIR="${CONFIG_DIR}/overrides"
10+
OVERRIDES_CONFIG_DIR="/config"
1111
CUE_DIR="${CONFIG_DIR}/cue"
1212

1313
IS_SERVER_RESTART=false

0 commit comments

Comments
 (0)