Skip to content

Commit

Permalink
Merge pull request #139 from 3ventic/tshock5
Browse files Browse the repository at this point in the history
tshock v5 support
  • Loading branch information
ryansheehan authored Nov 8, 2022
2 parents f34cbb4 + 88a0763 commit ab8aa8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions tshock/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ RUN apk add --update-cache \
# add the bootstrap file
COPY bootstrap.sh /tshock/bootstrap.sh

ENV TSHOCKVERSION=v4.5.18
ENV TSHOCKZIP=TShock4.5.18_Terraria1.4.3.6.zip
ENV TSHOCKVERSION=v5.0.0
ENV TSHOCKZIP=TShock-5.0.0-for-Terraria-1.4.4.7-linux-x64-Release.zip

# Download and unpack TShock
ADD https://github.com/Pryaxis/TShock/releases/download/$TSHOCKVERSION/$TSHOCKZIP /
RUN unzip $TSHOCKZIP -d /tshock && \
tar -xvf /tshock/*.tar -C /tshock && \
rm $TSHOCKZIP && \
chmod +x /tshock/TerrariaServer.exe && \
chmod +x /tshock/TShock.Server && \
# add executable perm to bootstrap
chmod +x /tshock/bootstrap.sh

# do not use -slim due to mysql/tshock requirements
FROM mono:6.12.0.122
FROM mcr.microsoft.com/dotnet/runtime:6.0

LABEL maintainer="Ryan Sheehan <[email protected]>"

Expand Down
4 changes: 2 additions & 2 deletions tshock/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ if [ -z "$WORLD_FILENAME" ]; then
else
echo "Running server with command flags: $@"
fi
mono --server --gc=sgen -O=all TerrariaServer.exe -configpath "$CONFIGPATH" -logpath "$LOGPATH" "$@"
./TShock.Server -configpath "$CONFIGPATH" -logpath "$LOGPATH" "$@"
else
echo "Environment WORLD_FILENAME specified"
if [ -f "$WORLD_PATH" ]; then
echo "Loading to world $WORLD_FILENAME..."
mono --server --gc=sgen -O=all TerrariaServer.exe -configpath "$CONFIGPATH" -logpath "$LOGPATH" -world "$WORLD_PATH" "$@"
./TShock.Server -configpath "$CONFIGPATH" -logpath "$LOGPATH" -world "$WORLD_PATH" "$@"
else
echo "Unable to locate $WORLD_PATH.\nPlease make sure your world file is volumed into docker: -v <path_to_world_file>:/root/.local/share/Terraria/Worlds"
exit 1
Expand Down

0 comments on commit ab8aa8d

Please sign in to comment.