Compare commits

..

5 Commits

Author SHA1 Message Date
a33799c886
add uid/gid selection to run application as in Dockerfile 2025-08-12 19:14:50 +03:00
9f66b6701e
rearranged Dockerfile statements and add remove cache after locale installation 2025-08-12 19:14:00 +03:00
aaff9eb3e2 Merge pull request 'feature-23-track-rename' (#36) from feature-23 into develop
All checks were successful
/ build-docker (push) Successful in 10m46s
Reviewed-on: #36
2025-08-10 16:55:42 +00:00
e109ab6058
rename track "staff" to "roles" 2025-08-07 00:17:17 +03:00
6e9de1b3b8 Merge pull request 'feature-42-fix-unicode' (#35) from feature-42 into develop
All checks were successful
/ build-docker (push) Successful in 14m15s
Reviewed-on: #35
2025-08-06 18:57:18 +00:00
2 changed files with 20 additions and 5 deletions

View File

@ -57,13 +57,20 @@ RUN mkdir -p ${DATA_PATH}/FancyNpcs/logs && \
# Generate unicode locale so that cyrillic characters display properly
RUN apt-get update -y && apt-get install -y locales && \
echo en_US.UTF-8 UTF-8 > /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales
dpkg-reconfigure --frontend=noninteractive locales && \
rm -Rf var/lib/apt/lists/*
ENV LANG en_US.UTF-8
VOLUME ${DATA_PATH}
EXPOSE 25565/tcp
ENV GID=988
ENV UID=999
ENV MEMORY=4G
ENV PROXY_SECRET=00000000-0000-0000-0000-000000000000
@ -84,9 +91,14 @@ ENV SKINSRESTORER_DB_PASSWORD=0000
WORKDIR ${WORKDIR_PATH}/config
EXPOSE 25565/tcp
CMD \
# Create and switch to user with desired UID and GID.
# All processes that create/change files in ${DATA_PATH}
# must be run under this user.
groupadd -g ${GID} worker && \
useradd -M -g ${GID} -u ${UID} worker && \
chmod -R o-rwx ${WORKDIR_PATH} && \
# Add proxy secret
sed -i "s/_PROXY_SECRET_/${PROXY_SECRET}/g" config/paper-global.yml && \
@ -107,5 +119,8 @@ CMD \
sed -i "s/_SKINSRESTORER_DB_USERNAME_/${SKINSRESTORER_DB_USERNAME}/g" plugins/SkinsRestorer/config.yml && \
sed -i "s/_SKINSRESTORER_DB_PASSWORD_/${SKINSRESTORER_DB_PASSWORD}/g" plugins/SkinsRestorer/config.yml && \
# Change UID and GID of used files to desired values.
chown -R worker:worker ${WORKDIR_PATH} && \
# Launch
java -Xms${MEMORY} -Xmx${MEMORY} -jar *.jar -nogui
su worker -c "java -Xms${MEMORY} -Xmx${MEMORY} -jar *.jar -nogui"

View File

@ -404,7 +404,7 @@ auto-install-translations: true
meta-formatting:
prefix:
format:
- highest_on_track_staff
- highest_on_track_roles
- highest_on_track_clans
duplicates: first-only