Merge pull request 'suggestion-90-separate-data-files-creation-and-linking' (#48) from suggestion-90 into develop
All checks were successful
/ build-docker (push) Successful in 21m33s

Reviewed-on: #48
Reviewed-by: oznobys <oznobys@noreply.localhost>
This commit is contained in:
cuqmbr 2025-08-29 14:34:23 +00:00
commit 3c7adced1d

View File

@ -10,87 +10,73 @@ ADD ./src ${CONFIG_PATH}
RUN mkdir ${DATA_PATH} RUN mkdir ${DATA_PATH}
RUN mkdir ${CACHE_PATH} RUN mkdir ${CACHE_PATH}
# Add symlinks to data files
# Add symlinks to Minecraft Vanilla files # Minecraft Vanilla
RUN mkdir ${DATA_PATH}/Vanilla && \ RUN ln -sf ${DATA_PATH}/Vanilla/banned-ips.json \
touch ${DATA_PATH}/Vanilla/banned-ips.json && \ ${CONFIG_PATH}/banned-ips.json && \
ln -sf ${DATA_PATH}/Vanilla/banned-ips.json ${CONFIG_PATH} && \ ln -sf ${DATA_PATH}/Vanilla/banned-players.json \
touch ${DATA_PATH}/Vanilla/banned-players.json && \ ${CONFIG_PATH}/banned-players.json && \
ln -sf ${DATA_PATH}/Vanilla/banned-players.json ${CONFIG_PATH} && \ ln -sf ${DATA_PATH}/Vanilla/logs \
mkdir ${DATA_PATH}/Vanilla/logs && \ ${CONFIG_PATH}/logs && \
ln -sf ${DATA_PATH}/Vanilla/logs ${CONFIG_PATH} && \ ln -sf ${DATA_PATH}/Vanilla/ops.json \
touch ${DATA_PATH}/Vanilla/ops.json && \ ${CONFIG_PATH}/ops.json && \
ln -sf ${DATA_PATH}/Vanilla/ops.json ${CONFIG_PATH} && \ ln -sf ${DATA_PATH}/Vanilla/usercache.json \
touch ${DATA_PATH}/Vanilla/usercache.json && \ ${CONFIG_PATH}/usercache.json && \
ln -sf ${DATA_PATH}/Vanilla/usercache.json ${CONFIG_PATH} && \ ln -sf ${DATA_PATH}/Vanilla/whitelist.json \
touch ${DATA_PATH}/Vanilla/whitelist.json && \ ${CONFIG_PATH}/whitelist.json && \
ln -sf ${DATA_PATH}/Vanilla/whitelist.json ${CONFIG_PATH} && \ ln -sf ${DATA_PATH}/Vanilla/world \
mkdir ${DATA_PATH}/Vanilla/world && \ ${CONFIG_PATH}/world && \
ln -sf ${DATA_PATH}/Vanilla/world ${CONFIG_PATH} && \ ln -sf ${DATA_PATH}/Vanilla/world_nether \
mkdir ${DATA_PATH}/Vanilla/world_nether && \ ${CONFIG_PATH}/world_nether && \
ln -sf ${DATA_PATH}/Vanilla/world_nether ${CONFIG_PATH} && \ ln -sf ${DATA_PATH}/Vanilla/world_the_end \
mkdir ${DATA_PATH}/Vanilla/world_the_end && \ ${CONFIG_PATH}/world_the_end
ln -sf ${DATA_PATH}/Vanilla/world_the_end ${CONFIG_PATH} # PlasmoVoice files
RUN ln -sf ${DATA_PATH}/PlasmoVoice/pv-voice_mutes.json \
# Add symlinks to PlasmoVoice files
RUN mkdir ${DATA_PATH}/PlasmoVoice && \
touch ${DATA_PATH}/PlasmoVoice/pv-voice_mutes.json && \
ln -sf ${DATA_PATH}/PlasmoVoice/pv-voice_mutes.json \
${CONFIG_PATH}/plugins/PlasmoVoice/voice_mutes.json ${CONFIG_PATH}/plugins/PlasmoVoice/voice_mutes.json
# SuperVanish
# Add symlinks to SuperVanish files RUN ln -sf ${DATA_PATH}/SuperVanish/data.yml \
RUN mkdir -p ${DATA_PATH}/SuperVanish && \
touch ${DATA_PATH}/SuperVanish/data.yml && \
ln -sf ${DATA_PATH}/SuperVanish/data.yml \
${CONFIG_PATH}/plugins/SuperVanish/data.yml ${CONFIG_PATH}/plugins/SuperVanish/data.yml
# CarbonChat
# Add symlinks to CarbonChat files RUN ln -sf ${DATA_PATH}/CarbonChat/users \
RUN mkdir -p ${DATA_PATH}/CarbonChat/users && \
ln -sf ${DATA_PATH}/CarbonChat/users \
${CONFIG_PATH}/plugins/CarbonChat/users ${CONFIG_PATH}/plugins/CarbonChat/users
# ImageFrame
# Add symlinks to ImageFrame files RUN ln -sf ${DATA_PATH}/ImageFrame/data/ \
RUN mkdir -p ${DATA_PATH}/ImageFrame/data && \
ln -sf ${DATA_PATH}/ImageFrame/data/ \
${CONFIG_PATH}/plugins/ImageFrame/data && \ ${CONFIG_PATH}/plugins/ImageFrame/data && \
mkdir -p ${DATA_PATH}/ImageFrame/players && \
ln -sf ${DATA_PATH}/ImageFrame/players/ \ ln -sf ${DATA_PATH}/ImageFrame/players/ \
${CONFIG_PATH}/plugins/ImageFrame/players && \ ${CONFIG_PATH}/plugins/ImageFrame/players && \
mkdir -p ${DATA_PATH}/ImageFrame/upload && \
ln -sf ${DATA_PATH}/ImageFrame/upload/ \ ln -sf ${DATA_PATH}/ImageFrame/upload/ \
${CONFIG_PATH}/plugins/ImageFrame/upload ${CONFIG_PATH}/plugins/ImageFrame/upload
# CustomPlayerModels
# Add symlinks to CusttomPlayerModels files RUN ln -sf ${DATA_PATH}/CustomizablePlayerModels/ \
RUN mkdir -p ${DATA_PATH}/CustomizablePlayerModels && \
ln -sf ${DATA_PATH}/CustomizablePlayerModels/ \
${CONFIG_PATH}/plugins/CustomizablePlayerModels ${CONFIG_PATH}/plugins/CustomizablePlayerModels
# BlueMap
# Add symlinks to BlueMap files RUN ln -sf ${DATA_PATH}/BlueMap/maps \
RUN mkdir -p ${DATA_PATH}/BlueMap/maps && \
mkdir -p ${DATA_PATH}/BlueMap/logs && \
ln -sf ${DATA_PATH}/BlueMap/maps \
${CONFIG_PATH}/plugins/BlueMap/data/web/maps && \ ${CONFIG_PATH}/plugins/BlueMap/data/web/maps && \
ln -sf ${DATA_PATH}/BlueMap/logs \ ln -sf ${DATA_PATH}/BlueMap/logs \
${CONFIG_PATH}/plugins/BlueMap/data/logs ${CONFIG_PATH}/plugins/BlueMap/data/logs && \
RUN mkdir -p ${DATA_PATH}/BMMarker/data && \
ln -sf ${DATA_PATH}/BMMarker/data \ ln -sf ${DATA_PATH}/BMMarker/data \
${CONFIG_PATH}/plugins/BMMarker/data ${CONFIG_PATH}/plugins/BMMarker/data
# Chunky
# Add symlinks to Chunky files RUN ln -sf ${DATA_PATH}/Chunky/tasks \
RUN mkdir -p ${DATA_PATH}/Chunky/tasks && \
ln -sf ${DATA_PATH}/Chunky/tasks \
${CONFIG_PATH}/plugins/Chunky/tasks ${CONFIG_PATH}/plugins/Chunky/tasks
VOLUME ${DATA_PATH} VOLUME ${DATA_PATH}
# Add symlinks to cache files # Add symlinks to cache files
RUN ln -sf ${CACHE_PATH}/cache ${CONFIG_PATH}/cache && \ RUN ln -sf ${CACHE_PATH}/cache \
ln -sf ${CACHE_PATH}/libraries ${CONFIG_PATH}/libraries && \ ${CONFIG_PATH}/cache && \
ln -sf ${CACHE_PATH}/versions ${CONFIG_PATH}/versions && \ ln -sf ${CACHE_PATH}/libraries \
ln -sf ${CACHE_PATH}/plugins/.paper-remapped ${CONFIG_PATH}/plugins/.paper-remapped && \ ${CONFIG_PATH}/libraries && \
ln -sf ${CACHE_PATH}/plugins/LuckPerms/libs ${CONFIG_PATH}/plugins/LuckPerms/libs && \ ln -sf ${CACHE_PATH}/versions \
ln -sf ${CACHE_PATH}/orebfuscator_cache ${CONFIG_PATH}/orebfuscator_cache ${CONFIG_PATH}/versions && \
ln -sf ${CACHE_PATH}/plugins/.paper-remapped \
${CONFIG_PATH}/plugins/.paper-remapped && \
ln -sf ${CACHE_PATH}/plugins/LuckPerms/libs \
${CONFIG_PATH}/plugins/LuckPerms/libs && \
ln -sf ${CACHE_PATH}/orebfuscator_cache \
${CONFIG_PATH}/orebfuscator_cache
VOLUME ${CACHE_PATH} VOLUME ${CACHE_PATH}
@ -180,6 +166,86 @@ CMD \
useradd -M -g ${GID} -u ${UID} worker && \ useradd -M -g ${GID} -u ${UID} worker && \
chmod -R o-rwx ${WORKDIR_PATH} && \ chmod -R o-rwx ${WORKDIR_PATH} && \
# Create data files
# Minecraft Vanilla
if [ ! -e ${DATA_PATH}/Vanilla ]; \
then mkdir ${DATA_PATH}/Vanilla; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/banned-ips.json ]; \
then touch ${DATA_PATH}/Vanilla/banned-ips.json; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/banned-players.json ]; \
then touch ${DATA_PATH}/Vanilla/banned-players.json; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/logs ]; \
then mkdir ${DATA_PATH}/Vanilla/logs; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/ops.json ]; \
then touch ${DATA_PATH}/Vanilla/ops.json; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/usercache.json ]; \
then touch ${DATA_PATH}/Vanilla/usercache.json; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/whitelist.json ]; \
then touch ${DATA_PATH}/Vanilla/whitelist.json; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/world ]; \
then mkdir ${DATA_PATH}/Vanilla/world; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/world_nether ]; \
then mkdir ${DATA_PATH}/Vanilla/world_nether; \
fi && \
if [ ! -e ${DATA_PATH}/Vanilla/world_the_end ]; \
then mkdir ${DATA_PATH}/Vanilla/world_the_end; \
fi && \
# PlasmoVoice
if [ ! -e ${DATA_PATH}/PlasmoVoice ]; \
then mkdir ${DATA_PATH}/PlasmoVoice; \
fi && \
if [ ! -e ${DATA_PATH}/PlasmoVoice/pv-voice_mutes.json ]; \
then touch ${DATA_PATH}/PlasmoVoice/pv-voice_mutes.json; \
fi && \
# SuperVanish
if [ ! -e ${DATA_PATH}/SuperVanish ]; \
then mkdir -p ${DATA_PATH}/SuperVanish; \
fi && \
if [ ! -e ${DATA_PATH}/SuperVanish/data.yml ]; \
then touch ${DATA_PATH}/SuperVanish/data.yml; \
fi && \
# CarbonChat
if [ ! -e ${DATA_PATH}/CarbonChat/users ]; \
then mkdir -p ${DATA_PATH}/CarbonChat/users; \
fi && \
# ImageFrame
if [ ! -e ${DATA_PATH}/ImageFrame/data ]; \
then mkdir -p ${DATA_PATH}/ImageFrame/data; \
fi && \
if [ ! -e ${DATA_PATH}/ImageFrame/players ]; \
then mkdir -p ${DATA_PATH}/ImageFrame/players; \
fi && \
if [ ! -e ${DATA_PATH}/ImageFrame/upload ]; \
then mkdir -p ${DATA_PATH}/ImageFrame/upload; \
fi && \
# CusttomPlayerModels
if [ ! -e ${DATA_PATH}/CustomizablePlayerModels ]; \
then mkdir -p ${DATA_PATH}/CustomizablePlayerModels; \
fi && \
# BlueMap
if [ ! -e ${DATA_PATH}/BlueMap/maps ]; \
then mkdir -p ${DATA_PATH}/BlueMap/maps; \
fi && \
if [ ! -e ${DATA_PATH}/BlueMap/logs ]; \
then mkdir -p ${DATA_PATH}/BlueMap/logs; \
fi && \
if [ ! -e ${DATA_PATH}/BMMarker/data ]; \
then mkdir -p ${DATA_PATH}/BMMarker/data; \
fi && \
# Chunky
if [ ! -e ${DATA_PATH}/Chunky/tasks ]; \
then mkdir -p ${DATA_PATH}/Chunky/tasks; \
fi && \
# Create cache files and folders # Create cache files and folders
if [ ! -e ${CACHE_PATH}/cache ]; \ if [ ! -e ${CACHE_PATH}/cache ]; \
then mkdir -p ${CACHE_PATH}/cache; \ then mkdir -p ${CACHE_PATH}/cache; \