Init
This commit is contained in:
commit
3fc4012113
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/app
|
||||
GT_New_Horizons_2.4.0_Server_Java_17-20.zip
|
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM openjdk:20
|
||||
COPY app /app
|
||||
ADD https://github.com/GTNewHorizons/Hodgepodge/releases/download/2.2.8/hodgepodge-2.2.8.jar /app/mods/hodgepodge-2.2.31.jar
|
||||
COPY prepare_evironment.sh startserver.sh /app/
|
||||
RUN mkdir -p /data
|
||||
WORKDIR /app
|
||||
EXPOSE 25565
|
||||
CMD ["/app/startserver.sh"]
|
9
compose.yaml
Normal file
9
compose.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
services:
|
||||
minecraft:
|
||||
build: .
|
||||
volumes:
|
||||
- data:/data
|
||||
ports:
|
||||
- "25565:25565"
|
||||
volumes:
|
||||
data:
|
11
download.sh
Executable file
11
download.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -f GT_New_Horizons_2.4.0_Server_Java_17-20.zip ]; then
|
||||
wget https://downloads.gtnewhorizons.com/ServerPacks/GT_New_Horizons_2.4.0_Server_Java_17-20.zip
|
||||
fi
|
||||
if [ ! -d app ]; then
|
||||
mkdir app
|
||||
cd app || exit
|
||||
unzip ../GT_New_Horizons_2.4.0_Server_Java_17-20.zip
|
||||
cd ..
|
||||
fi
|
26
prepare_environment.sh
Executable file
26
prepare_environment.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "eula=true" > eula.txt
|
||||
|
||||
if [ ! -f /data/.initialized ]; then
|
||||
mkdir -p /data/logs /data/World /data/crash-reports
|
||||
for i in "server.properties" "usercache.json" "whitelist.json" "ops.json" "config"
|
||||
do
|
||||
cp -r $i /data/
|
||||
done
|
||||
sed -i 's/online-mode=true/online-mode=false/' /data/server.properties
|
||||
touch /data/.initialized
|
||||
fi
|
||||
|
||||
if [ ! -f /app/.initialized ]; then
|
||||
for i in "server.properties" "usercache.json" "whitelist.json" "ops.json" "config"
|
||||
do
|
||||
rm -r $i
|
||||
ln -s /data/$i $i
|
||||
done
|
||||
ln -s /data/logs .
|
||||
ln -s /data/World .
|
||||
ln -s /data/crash-reports .
|
||||
|
||||
touch /app/.initialized
|
||||
fi
|
2
startserver.sh
Executable file
2
startserver.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
/app/prepare_environment.sh && java -Xms6G -Xmx6G -Dfml.readTimeout=180 @java9args.txt nogui
|
Loading…
Reference in New Issue
Block a user