Battlelore version merge

Prefered version
This commit is contained in:
ChocoTaco 2019-12-22 15:22:08 -05:00
parent 09eb245515
commit 881c922b99
14 changed files with 385 additions and 69 deletions

View file

@ -1,51 +1,79 @@
FROM i386/ubuntu:latest
MAINTAINER sairuk battlelore chocotaco
# Multi-Stage Build (TacoServer)
# This stage compiles the various resources that make up TacoServer
FROM alpine:3.10 as tacobuilder
RUN apk --update add git sed less wget nano openssh && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/*
WORKDIR /tmp
RUN git clone --depth 1 "https://github.com/ChocoTaco1/TacoServer/" && cd ./TacoServer
WORKDIR /tmp
RUN git clone --depth 1 "https://github.com/ChocoTaco1/TacoMaps/" && cd ./TacoMaps
WORKDIR /tmp
RUN git clone --depth 1 "https://github.com/ChocoTaco1/NoTNscripts/" && cd ./NoTNscripts
# Main Game Server Image
FROM ubuntu:18.04
LABEL maintainer="sairuk, battlelore, chocotaco"
# ENVIRONMENT
ARG SRVUSER=gameserv
ARG SRVUID=1000
ARG SRVDIR=/tmp/tribes2/
ENV INSTDIR=/home/${SRVUSER}/.wine/drive_c/Dynamix/Tribes2/
ENV INSTDIR=/home/${SRVUSER}/.wine32/drive_c/Dynamix/Tribes2/
# WINE VERSION: wine = 1.6, wine-development = 1.7.29 for i386-jessie
ENV WINEVER=wine-development
ENV WINEARCH=win32
ENV WINEPREFIX=/home/${SRVUSER}/.wine32/
#WINEARCH=win32 WINEPREFIX=/home/gameserv/.wine32/ wine wineboot
# UPDATE IMAGE
RUN apt-get -y update
RUN apt-get -y upgrade
RUN dpkg --add-architecture i386
RUN apt-get -y update --fix-missing && apt-get -y upgrade
# DEPENDENCIES
RUN dpkg --add-architecture i386
RUN apt-get -y install \
# -- access
sudo unzip \
# -- logging
rsyslog \
# -- utilities
sed less vim file nano wget \
sed less nano vim file wget gnupg2 software-properties-common netcat \
# --- wine
${WINEVER} \
#${WINEVER} \
# -- display
xvfb \
# -- git clone
git-core
xvfb
RUN wget --no-check-certificate https://dl.winehq.org/wine-builds/winehq.key
RUN apt-key add winehq.key
RUN add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
RUN add-apt-repository ppa:cybermax-dexter/sdl2-backport
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install --install-recommends winehq-devel
# CLEAN IMAGE
RUN apt-get -y clean && apt-get -y autoremove
# ENV
# -- shutup installers
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND noninteractive
# USER
# -- add the user, expose datastore
RUN useradd -m -s /bin/bash -u ${SRVUID} ${SRVUSER}
# -- temporarily steal ownership
RUN chown -R root: /home/${SRVUSER}
# -- set wine win32 env
RUN WINEARCH=win32 WINEPREFIX=/home/gameserv/.wine32/ wine wineboot
# SCRIPT - installer
COPY _scripts/tribesnext-server-installer ${SRVDIR}
@ -57,11 +85,27 @@ RUN ${SRVDIR}/tribesnext-server-installer
COPY _scripts/start-server ${INSTDIR}/start-server
RUN chmod +x ${INSTDIR}/start-server
# TacoServer - Pull in resources from builder
COPY --from=tacobuilder /tmp/TacoServer/Classic/. ${INSTDIR}GameData/Classic/.
COPY --from=tacobuilder /tmp/TacoMaps/. ${INSTDIR}GameData/Classic/Maps/
COPY --from=tacobuilder /tmp/NoTNscripts/. ${INSTDIR}GameData/Classic/scripts/autoexec/.
# CLEAN UP
COPY _scripts/clean-up ${SRVDIR}
RUN chmod +x ${SRVDIR}/clean-up
RUN ${SRVDIR}/clean-up ${INSTDIR}
# SCRIPT - custom (custom content / overrides)
COPY _custom/. ${INSTDIR}
# SCRIPT - expand admin prefs
COPY _scripts/cfg-admin-prefs ${SRVDIR}
RUN chmod +x ${SRVDIR}/cfg-admin-prefs
# PERMISSIONS
RUN chown -R ${SRVUSER}: /home/${SRVUSER}

View file

@ -1,13 +1,13 @@
# Docker TribesNext
## Information
TribesNext dedicated server patched and running within Docker under wine.
Tribes 2 dedicated server patched to run in Lan mode and running within Docker under wine.
*This is TribesNext RC2a with the wine patches included.*
*This is does not include TribesNext and uses a LAN patch to run in without it*
The image will pull required files and install them at build time (providing the sources are live).
Docker image is completely self contained when built; it is currently based off Debian Jessie 32bit. This brings in the server at around 1.6GB once built.
Docker image is completely self contained when built; it is currently based off Alpine/Ubuntu. This brings in the server at around 3.2GB once built.
The server runs as the gameserv user
@ -23,23 +23,22 @@ No volumes are used
## Usage
**Build the image**
`docker build . -t tribesnext-server`
`sudo docker-compose up --build`
**Run a container**
NB: the `--rm` arg will destroy the container when stopped; internal ports (666) can be mapped to available host ports (27999) per container
```
docker run -d --rm -p 27999:666/tcp -p 28000:28000/udp --name tribesnext-server tribesnext-server:latest
```
The container starts automatically when built.
**Stop container**
`docker stop tribesnext-server`
`docker ps`
`docker stop <container-id>`
## Server Customization
You can customize the server at build time by dropping the appropriate files at the appropriate locations in `_custom/`, these will be copied into the image into the install location within the container at build time.
You can customize your server from the available options in the docker compose. These are set at build time.
You can override the following defaults at build time
```
@ -59,7 +58,25 @@ You can modify the installer script to update the source locations of the requir
Testing has been minimal but it is running the NET247 server so you can try it out at any point.
## 2do
* Thinner base OS
* Reduce duplicate data across scripts
## SSH into server
```
docker ps
docker exec -it --user root <container-id> bash
```
## Install Docker
```
curl -fsSL get.docker.com -o get-docker.sh && sudo sh get-docker.sh
sudo usermod -aG docker USERNAME
```
## Install Docker-Compose
```
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
```

View file

@ -0,0 +1 @@
$Host::AdminList = "";

View file

@ -0,0 +1 @@
$Host::AdminPassword = "changeme";

View file

@ -0,0 +1 @@
$Host::ClassicSuperAdminPassword = "changme";

View file

@ -0,0 +1 @@
$Host::ClassicTelnetListenPass = "changeme";

View file

@ -0,0 +1 @@
$Host::ClassicTelnetPassword = "changeme";

View file

@ -0,0 +1 @@
$Host::SuperAdminList = "";

166
_scripts/cfg-admin-prefs Normal file
View file

@ -0,0 +1,166 @@
#!/bin/bash
SRVUSER=gameserv
ADMINPREFS_FILE=/home/$SRVUSER/.wine32/drive_c/Dynamix/Tribes2/GameData/Classic/scripts/autoexec/AdminPrefs.cs
SECRETS=/run/secrets
# -- set Admin Password
cat ${SECRETS}/t2.admin.password >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set classic SA PW
cat ${SECRETS}/t2.classic.superadmin.password >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set classic telnet listen password
cat ${SECRETS}/t2.classic.telnet.listen.password >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set classic telnet password
cat ${SECRETS}/t2.classic.telnet.password >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set sa/admin lists
echo "\$Host::AdminList = \"${T2_ADMIN_LIST}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::SuperAdminList = \"${T2_SA_LIST}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set server name
echo "\$Host::GameName = \"${T2_SERVERNAME}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set mission type
echo "\$Host::MissionType = \"${T2_DEFAULT_MISSIONTYPE}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- time limit
echo "\$Host::TimeLimit = \"${T2_TimeLimit}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set map
echo "\$Host::Map = \"${T2_DEFAULT_MAP}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set max players
echo "\$Host::MaxPlayers = \"${T2_MAX_PLAYERS}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set telnet on/off
echo "\$Host::ClassicTelnet = ${T2_Telnet};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::ClassicTelnetPort = ${T2_Telnet_Port};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set admin voting options
echo "\$Host::allowAdminPlayerVotes = ${T2_VoteAdmin};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::EvoAdminMinPlayers = ${T2_VoteAdminPlayerMin};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::EvoAdminAdmin = ${T2_Admin2AdminOthers};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set baserape
echo "\$Host::EvoNoBaseRapeClassicPlayerCount = ${T2_BaseRapeMin};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::EvoNoBaseRapePlayerCount = ${T2_BaseRapeMin};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set turret min
echo "\$Host::EnableTurretPlayerCount = ${T2_TurretMin};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set cloak pack min
echo "\$Host::AntiCloakPlayerCount = ${T2_CloakMin};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set packet settings
echo "\$Host::ClassicPacketRateToClient = ${T2_PacketRate};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::ClassicPacketSize = ${T2_PacketSize};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set observer timeout
echo "\$Host::EvoKickObservers = ${T2_ObserverTimeout};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set ban time
echo "\$Host::BanTime = ${T2_BanTime};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set empty server reset
if [ "T2_EmptyServerReset" = 1 ]
then
echo "\$Host::EmptyServerReset = ${T2_EmptyServerReset};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::EmptyServerResetTime = ${T2_EmptyServerResetTime};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
fi
# -- set PUG always on
if [ "$T2_PUGPW_ALWAYSON" = 1 ]
then
echo "\$Host::PUGpasswordAlwaysOn = ${T2_PUGPW_ALWAYSON};" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
fi
# -- set server/pug pw
echo "\$Host::PUGPassword = \"${T2_PUG_PASSWORD}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::PUGautoPassword = \"${T2_PUGAUTOPW_TOURNY}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set smurfs
echo "\$Host::NoSmurfs = \"${T2_NoSmurfs}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set Evo Centerprint Banner
echo "\$Host::EvoMOTD = \"${T2_JoinBanner}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::EvoMOTDlines = \"${T2_JoinBannerLines}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::EvoMOTDtime = \"${T2_JoinBannerTime}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
# -- set Loading Screen Options
echo "\$Host::LoadScreenColor1 = \"${T2_LoadScreenColor1}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenColor2 = \"${T2_LoadScreenColor2}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenColor3 = \"${T2_LoadScreenColor3}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine1 = \"${T2_LoadScreenLine1}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine1_Msg = \"${T2_LoadScreenLine1_Msg}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine2 = \"${T2_LoadScreenLine2}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine2_Msg = \"${T2_LoadScreenLine2_Msg}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine3 = \"${T2_LoadScreenLine3}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine3_Msg = \"${T2_LoadScreenLine3_Msg}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine4 = \"${T2_LoadScreenLine4}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine4_Msg = \"${T2_LoadScreenLine4_Msg}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine5 = \"${T2_LoadScreenLine5}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine5_Msg = \"${T2_LoadScreenLine5_Msg}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine6 = \"${T2_LoadScreenLine6}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenLine6_Msg = \"${T2_LoadScreenLine6_Msg}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenMOTD1 = \"${T2_LoadScreenMOTD1}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenMOTD2 = \"${T2_LoadScreenMOTD2}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenMOTD3 = \"${T2_LoadScreenMOTD3}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE
echo "\$Host::LoadScreenMOTD4 = \"${T2_LoadScreenMOTD4}\";" >> $ADMINPREFS_FILE
printf "\n" >> $ADMINPREFS_FILE

20
_scripts/clean-up Normal file
View file

@ -0,0 +1,20 @@
#!/bin/bash
echo "Removing old installers"
[ -f TribesNext_RC2_LinuxVersion.zip ] && rm TribesNext_RC2_LinuxVersion.zip
[ -f TribesNext_rc2a.exe ] && rm TribesNext_rc2a.exe
[ -f classic_v152.zip ] && rm classic_v152.zip
[ -f ruby-1.9.0-2-i386-mswin32.zip ] && rm ruby-1.9.0-2-i386-mswin32.zip
[ -f tribes2gsi.exe ] && rm tribes2gsi.exe
echo "Done!"
echo "Removing TacoServer TribesNext Incompatibilities"
# Remove zAdvancedStatsLogless.vl2: causes issues connecting without TN
rm $1/GameData/Classic/zAdvancedStatsLogless.vl2
# Remove checkVer: Wont work anyway without TN
rm $1/GameData/Classic/scripts/autoexec/zCheckVer.cs
echo "Done!"

View file

@ -1,11 +1,18 @@
#!/bin/bash
export WINEPREFIX=/home/gameserv/.wine
export WINEPREFIX=/home/gameserv/.wine32
export WINEARCH=win32
BASEDIR=$WINEPREFIX/drive_c/Dynamix/Tribes2/GameData
echo "Update Admin & Server Prefs..."
/tmp/tribes2/cfg-admin-prefs
echo "Finished!"
find ${BASEDIR} -name \*.dso -execdir /bin/rm {} \;
cd $WINEPREFIX/drive_c/Dynamix/Tribes2/GameData
wine --version
xvfb-run -a -w 5 $WINEVER Tribes2.exe -dedicated -mod Classic
echo "Running the Tribes 2 server"
xvfb-run -a -w 5 wine Tribes2d.exe -nologin -dedicated -mod Classic

View file

@ -7,10 +7,11 @@
#
SRVUSER=gameserv
INSBASE=/home/$SRVUSER/.wine/drive_c/Dynamix/
INSBASE=/home/$SRVUSER/.wine32/drive_c/Dynamix/
export TMPBASE=/tmp/tribes2
export WINEPREFIX=/home/$SRVUSER/.wine/
export REQUIREMENTS=($WINEVER Xvfb)
export WINEARCH=win32
export WINEPREFIX=/home/$SRVUSER/.wine32/
export REQUIREMENTS=(wine Xvfb)
# -- server requirements
function check_requirements {
@ -51,13 +52,9 @@ fi
# -- download files
get_files tribes2gsi.exe "https://www.the-construct.net/downloads/tribes2/" "$TMPBASE"
get_files TribesNext_rc2a.exe "https://www.tribesnext.com/files/" "$TMPBASE"
get_files ruby-1.9.0-2-i386-mswin32.zip "https://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/unstable/" "$TMPBASE"
get_files tribes2-lan-fix-win32.zip "http://t2.plugh.us/" "$TMPBASE"
get_files classic_v152.zip "https://tribes2stats.com/files/mods/" "$TMPBASE"
git clone "https://github.com/ChocoTaco1/TacoServer/" "$TMPBASE/TacoServer"
git clone "https://github.com/ChocoTaco1/TacoMaps/" "$TMPBASE/TacoMaps"
# -- some items require an headerless
export DISPLAY=:99
[ ! $(pidof Xvfb) ] && Xvfb :99 -screen 0 640x480x8 -nolisten tcp & 2>&1 > /dev/null
@ -67,9 +64,9 @@ export DISPLAY=:99
sleep 1
# -- extract the main installer, the silent installer is a lie!
echo "Installing tribes2gsi.exe..."
/usr/bin/$WINEVER $TMPBASE/tribes2gsi.exe /x Z:\\tmp\\tribes2\\game
# -- extract the main installer, the silent installer is a lie!
echo "Installing T2..."
/usr/bin/wine $TMPBASE/tribes2gsi.exe /x Z:\\tmp\\tribes2\\game
# -- move all extract files into place
@ -248,41 +245,30 @@ then
mv $TMPBASE/game/weapTurretCode.cs $INSBASE/Tribes2/GameData/Classic/scripts/weapTurretCode.cs
mv $TMPBASE/game/zz_Classic_client_v1.vl2 $INSBASE/Tribes2/GameData/base/zz_Classic_client_v1.vl2
mv $TMPBASE/game/zz.ini $INSBASE/Tribes2/GameData/zz.ini
echo "T2 installed!"
fi
# -- install tribesnext silently
echo "Installing TribesNext_rc2a.exe..."
[ -f $TMPBASE/TribesNext_rc2a.exe ] && /usr/bin/$WINEVER $TMPBASE/TribesNext_rc2a.exe /S
# -- update Ruby v1.9.0-2
echo "Installing Ruby Interpreter v1.9.0-2..."
[ -f $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip ] && /usr/bin/unzip -o $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip -d $TMPBASE/ruby 2>&1 > /dev/null
if [ -f $TMPBASE/ruby-1.9.0-2-i386-mswin32.zip ]
then
cp -r $TMPBASE/ruby/bin/msvcrt-ruby190.dll $INSBASE/Tribes2/GameData/msvcrt-ruby190.dll
fi
echo "Installing Classic Mod v1.5.2"
# -- update Classic mod to v1.5.2
echo "Installing Classic mod to v1.5.2..."
[ -f $TMPBASE/classic_v152.zip ] && /usr/bin/unzip -o $TMPBASE/classic_v152.zip -d $TMPBASE/classic 2>&1 > /dev/null
[ -f $TMPBASE/classic/classic_files_v152.zip ] && /usr/bin/unzip -o $TMPBASE/classic/classic_files_v152.zip -d $TMPBASE/classic 2>&1 > /dev/null
# -- move all extract files into place
if [ -f $TMPBASE/classic/classic_files_v152.zip ]
then
# /home/gameserv/.wine/drive_c/Dynamix/Tribes2/GameData/Classic
# /home/gameserv/.wine32/drive_c/Dynamix/Tribes2/GameData/Classic
mv -f $TMPBASE/classic/base/zz_classic_client_v1.vl2 $INSBASE/Tribes2/GameData/base/zz_Classic_client_v1.vl2
cp -r $TMPBASE/classic/classic/. $INSBASE/Tribes2/GameData/Classic/.
fi
# -- install TacoServer
echo "Installing TacoServer..."
cp -r $TMPBASE/TacoServer/Classic/. $INSBASE/Tribes2/GameData/Classic/.
# -- install TacoMaps
echo "Installing TacoMaps..."
mkdir -p $INSBASE/Tribes2/GameData/Classic/Maps
cp -r $TMPBASE/TacoMaps/. $INSBASE/Tribes2/GameData/Classic/Maps/
# -- install LAN fix
echo "Installing Tribes2 Lan Fix (Win32)..."
# -- run the bat and output the patched file (Tribes2d.exe)
[ -f $TMPBASE/tribes2-lan-fix-win32.zip ] && /usr/bin/unzip -o $TMPBASE/tribes2-lan-fix-win32.zip -d $INSBASE/Tribes2/GameData 2>&1 > /dev/null
cd $INSBASE/Tribes2/GameData/ && wineconsole xdelta3 decode -s Tribes2.exe tribes2-lan-fix-win32.xdelta Tribes2d.exe
exit 0
echo "Finished setting up T2!"
exit 0

View file

@ -7,22 +7,78 @@ services:
context: .
dockerfile: ./Dockerfile
environment:
# TODO
T2_SERVERNAME: "T2DockerTest"
T2_SERVERNAME: "Docker Test"
T2_MAX_PLAYERS: 64
T2_DEFAULT_MISSIONTYPE: "Lakrabbit"
T2_DEFAULT_MAP: "VaubanLak"
T2_PUGPW_ALWAYSON: 1
T2_PUG_PASSWORD: "pickup"
T2_PUGAUTOPW_TOURNY: 1
T2_TimeLimit: 45
T2_Telnet: 1
T2_Telnet_Port: 55555
T2_BaseRapeMin: 14
T2_TurretMin: 10
T2_CloakMin: 6
T2_ObserverTimeout: 1200
T2_BanTime: 1800
T2_EmptyServerReset: 1
T2_EmptyServerResetTime: 120
T2_PacketRate: 32
T2_PacketSize: 450
T2_NoSmurfs: 0
T2_ADMIN_LIST: ""
T2_SA_LIST: ""
T2_VoteAdmin: 1
T2_VoteAdminPlayerMin: 8
T2_Admin2AdminOthers: 1
T2_JoinBanner: "<color:3cb4b4><font:Sui Generis:22>Welcome\\n<color:3cb4b4><font:Univers:16>Get Mappacks at https://playt2.tk"
T2_JoinBannerLines: 3
T2_JoinBannerTime: 6
T2_LoadScreenColor1: "05edad"
T2_LoadScreenColor2: "29DEE7"
T2_LoadScreenColor3: "33CCCC"
T2_LoadScreenLine1: "Join Discord:"
T2_LoadScreenLine1_Msg: "https://discord.me/tribes2"
T2_LoadScreenLine2: "Game Modes:"
T2_LoadScreenLine2_Msg: "LakRabbit, Capture the Flag, DeathMatch, (Light Only) Capture the Flag"
T2_LoadScreenLine3: "Required Mappacks:"
T2_LoadScreenLine3_Msg: "S5, S8, TWL, TWL2 - Get them at http://playt2.tk"
T2_LoadScreenLine4: "Server Location:"
T2_LoadScreenLine4_Msg: "Chicago"
T2_LoadScreenLine5: "Server Infrastructure GitHub:"
T2_LoadScreenLine5_Msg: "https://github.com/amineo/docker-tribesnext-server"
T2_LoadScreenLine6: "TacoServer GitHub:"
T2_LoadScreenLine6_Msg: "https://github.com/ChocoTaco1/TacoServer"
T2_LoadScreenMOTD1: "Have fun!"
T2_LoadScreenMOTD2: " "
T2_LoadScreenMOTD3: " "
T2_LoadScreenMOTD4: " "
secrets:
- t2.admin.password
- t2.classic.superadmin.password
- t2.classic.telnet.password
- t2.classic.telnet.listen.password
ports:
- target: 28000
published: 28000
protocol: udp
mode: host
- target: 666
- target: 55555
protocol: tcp
published: 27999
published: 666
mode: host
networks:
- t2-net
healthcheck:
test: ["CMD-SHELL", "nc -z -u 127.0.0.1 28000 || exit 1"]
interval: 10s
timeout: 5s
retries: 5
deploy:
replicas: 1
update_config:
@ -37,4 +93,18 @@ services:
networks:
t2-net:
driver: overlay
driver: overlay
secrets:
t2.admin.password:
external: true
name: t2.admin.password.v1
t2.classic.superadmin.password:
external: true
name: t2.classic.superadmin.password.v1
t2.classic.telnet.password:
external: true
name: t2.classic.telnet.password.v1
t2.classic.telnet.listen.password:
external: true
name: t2.classic.telnet.listen.password.v1