release-1.0.0 #4

Merged
cuqmbr merged 8 commits from develop into main 2025-08-14 10:30:52 +00:00
Showing only changes of commit 652f3896f9 - Show all commits

View File

@ -15,20 +15,36 @@ RUN mkdir ${DATA_PATH}/logs && \
# Generate unicode locale so that cyrillic characters display properly # Generate unicode locale so that cyrillic characters display properly
RUN apt-get update -y && apt-get install -y locales && \ RUN apt-get update -y && apt-get install -y locales && \
echo en_US.UTF-8 UTF-8 > /etc/locale.gen && \ 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 ENV LANG en_US.UTF-8
VOLUME ${DATA_PATH} VOLUME ${DATA_PATH}
EXPOSE 25565/tcp
ENV MEMORY=1G ENV MEMORY=1G
ENV PROXY_SECRET=change_me ENV PROXY_SECRET=change_me
WORKDIR ${WORKDIR_PATH}/config WORKDIR ${WORKDIR_PATH}/config
EXPOSE 25565/tcp
CMD \ 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" settings.yml && \ sed -i "s/_PROXY_SECRET_/${PROXY_SECRET}/g" settings.yml && \
java -Xms${MEMORY} -Xmx${MEMORY} -jar *.jar --nogui
# Change UID and GID of used files to desired values.
chown -R worker:worker ${WORKDIR_PATH} && \
# Launch
su worker -c "java -Xms${MEMORY} -Xmx${MEMORY} -jar *.jar --nogui"