mirror of
https://github.com/dragonlock2/matthewtran.com.git
synced 2025-10-11 20:17:54 +00:00
wip terraria service
This commit is contained in:
parent
70e1791001
commit
3c6c97f9f8
4
.gitignore
vendored
4
.gitignore
vendored
@ -4,5 +4,9 @@ __pycache__
|
|||||||
# minecraft
|
# minecraft
|
||||||
minecraft/world
|
minecraft/world
|
||||||
|
|
||||||
|
# terraria
|
||||||
|
terraria/worlds
|
||||||
|
terraria/password.txt
|
||||||
|
|
||||||
# wireguard
|
# wireguard
|
||||||
wireguard/*.conf
|
wireguard/*.conf
|
||||||
|
@ -1,9 +1,17 @@
|
|||||||
services:
|
services:
|
||||||
minecraft:
|
minecraft:
|
||||||
|
restart: always
|
||||||
build: minecraft/.
|
build: minecraft/.
|
||||||
entrypoint: ["/bin/sh", "/root/entry.sh"]
|
entrypoint: ["/bin/sh", "/root/entry.sh"]
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
volumes:
|
volumes:
|
||||||
- ./minecraft/world:/root/world
|
- ./minecraft/world:/root/world
|
||||||
|
terraria:
|
||||||
restart: always
|
restart: always
|
||||||
|
build: terraria/.
|
||||||
|
entrypoint: ["/bin/sh", "/root/entry.sh"]
|
||||||
|
ports:
|
||||||
|
- "7777:7777"
|
||||||
|
volumes:
|
||||||
|
- ./terraria/worlds:/root/worlds
|
||||||
|
19
terraria/Dockerfile
Normal file
19
terraria/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get upgrade
|
||||||
|
RUN apt-get install -y wget unzip tmux
|
||||||
|
|
||||||
|
# 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 entry.sh ./
|
||||||
|
|
||||||
|
WORKDIR /root/server/Linux
|
||||||
|
|
||||||
|
RUN chmod +x TerrariaServer.bin.x86_64
|
||||||
|
COPY password.default ./password.txt
|
||||||
|
COPY config.txt password.tx[t] ./
|
5
terraria/config.txt
Normal file
5
terraria/config.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
world=/root/worlds/default.wld
|
||||||
|
autocreate=3
|
||||||
|
worldname=default
|
||||||
|
difficulty=0
|
||||||
|
worldpath=/root/worlds
|
12
terraria/entry.sh
Normal file
12
terraria/entry.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
echo "TODO"
|
||||||
|
}
|
||||||
|
|
||||||
|
trap 'cleanup' TERM
|
||||||
|
|
||||||
|
# TODO use tmux so can send exit
|
||||||
|
./TerrariaServer.bin.x86_64 -config config.txt -pass $(cat password.txt) &
|
||||||
|
wait $! # wait for SIGTERM
|
||||||
|
# wait $! # wait for server to stop
|
1
terraria/password.default
Normal file
1
terraria/password.default
Normal file
@ -0,0 +1 @@
|
|||||||
|
password
|
Loading…
x
Reference in New Issue
Block a user