update volume creation

This commit is contained in:
Matthew Tran
2024-09-16 08:51:19 +00:00
parent b714e2895b
commit 2107249f47
12 changed files with 68 additions and 55 deletions
+6 -7
View File
@@ -3,19 +3,18 @@ FROM ubuntu:24.04
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y wget unzip
RUN useradd -m matt
USER matt
WORKDIR /home/matt
USER ubuntu
WORKDIR /home/ubuntu
# from https://terraria.fandom.com/wiki/Server (currently 1.4.4.9)
RUN wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-1449.zip
RUN unzip terraria-server-1449.zip && rm terraria-server-1449.zip
RUN mv 1449/ server/
COPY --chown=matt:matt entry.sh ./
COPY --chown=ubuntu:ubuntu entry.sh ./
WORKDIR /home/matt/server/Linux
WORKDIR /home/ubuntu/server/Linux
RUN chmod +x TerrariaServer.bin.x86_64
COPY --chown=matt:matt password.default ./password.txt
COPY --chown=matt:matt config.txt password.tx[t] ./
COPY --chown=ubuntu:ubuntu password.default ./password.txt
COPY --chown=ubuntu:ubuntu config.txt password.tx[t] ./
+2 -2
View File
@@ -1,6 +1,6 @@
world=/home/matt/worlds/legendary.wld
world=/home/ubuntu/worlds/legendary.wld
autocreate=3
seed=getfixedboi
worldname=legendary
difficulty=2
worldpath=/home/matt/worlds
worldpath=/home/ubuntu/worlds
+1
View File
@@ -6,6 +6,7 @@ cleanup() {
trap 'cleanup' TERM
rm cmd
mkfifo cmd
./TerrariaServer.bin.x86_64 -config config.txt -pass $(cat password.txt) < cmd &
echo "help\n" > cmd # shell waits for FIFO to be opened for writing before starting program!