Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
fanyx | a8492ad00b | |
fanyx | 1306a477e9 | |
fanyx | 86287db9ab | |
fanyx | eb3d051cc7 | |
fanyx | 519e1946ca | |
fanyx | e53bee942c | |
fanyx | b9d274cc2d |
|
@ -0,0 +1,46 @@
|
||||||
|
# TMSERVER
|
||||||
|
SERVER_LOGIN=<Dedicated Server Login>
|
||||||
|
SERVER_LOGIN_PASSWORD=
|
||||||
|
VALIDATION_KEY=
|
||||||
|
|
||||||
|
SERVER_SA_PASSWORD=
|
||||||
|
SERVER_ADM_PASSWORD=
|
||||||
|
|
||||||
|
SERVER_PORT=2350
|
||||||
|
SERVER_P2P_PORT=3450
|
||||||
|
SERVER_NAME=Trackmania Server
|
||||||
|
SERVER_COMMENT=This is a Trackmania Server
|
||||||
|
SERVER_PASSWORD=
|
||||||
|
HIDE_SERVER=0
|
||||||
|
MAX_PLAYERS=32
|
||||||
|
PACKMASK=stadium
|
||||||
|
|
||||||
|
GAMEMODE=1
|
||||||
|
CHATTIME=10000
|
||||||
|
FINISHTIMEOUT=1
|
||||||
|
DISABLERESPAWN=0
|
||||||
|
|
||||||
|
ROUNDS_POINTSLIMIT=30
|
||||||
|
|
||||||
|
TIMEATTACK_LIMIT=180000
|
||||||
|
|
||||||
|
TEAM_POINTSLIMIT=50
|
||||||
|
TEAM_MAXPOINTS=6
|
||||||
|
|
||||||
|
LAPS_NBLAPS=5
|
||||||
|
LAPS_TIMELIMIT=0
|
||||||
|
|
||||||
|
CUP_POINTSLIMIT=100
|
||||||
|
CUP_ROUNDSPERCHALLENGE=5
|
||||||
|
CUP_NBWINNERS=3
|
||||||
|
CUP_WARMUPDURATION=2
|
||||||
|
|
||||||
|
CUSTOM_PLAYLIST=
|
||||||
|
|
||||||
|
# XASECO
|
||||||
|
MASTERADMIN_LOGIN=<Your Login>
|
||||||
|
|
||||||
|
MYSQL_HOST=db
|
||||||
|
MYSQL_LOGIN=trackmania
|
||||||
|
MYSQL_DATABASE=trackmania
|
||||||
|
MYSQL_PASSWORD=
|
|
@ -0,0 +1,4 @@
|
||||||
|
MYSQL_ROOT_PASSWORD=
|
||||||
|
MYSQL_DATABASE=trackmania
|
||||||
|
MYSQL_USER=trackmania
|
||||||
|
MYSQL_PASSWORD=
|
34
README.md
34
README.md
|
@ -135,6 +135,7 @@ in the `tracks/` folder and mounting it to `/var/lib/tmserver/GameData/Tracks/Cu
|
||||||
|
|
||||||
You can add tracks to a playlist in a simple way.
|
You can add tracks to a playlist in a simple way.
|
||||||
Create a plaintext file like in the example below and mount it to `/var/lib/tmserver/playlist.txt`.
|
Create a plaintext file like in the example below and mount it to `/var/lib/tmserver/playlist.txt`.
|
||||||
|
To enable parsing of this file set `CUSTOM_PLAYLIST` in your env-file to anything but an empty string.
|
||||||
|
|
||||||
The tracks for the server are stored relative to `/var/lib/tmserver/GameData/Tracks`.
|
The tracks for the server are stored relative to `/var/lib/tmserver/GameData/Tracks`.
|
||||||
Creating your own playlist is as easy as specifying each track on a separate line in the `playlist.txt`
|
Creating your own playlist is as easy as specifying each track on a separate line in the `playlist.txt`
|
||||||
|
@ -158,6 +159,39 @@ Custom/mini01.Challenge.Gbx
|
||||||
Custom/SpeedxZxZ.Challenge.Gbx
|
Custom/SpeedxZxZ.Challenge.Gbx
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
**NOTE**
|
||||||
|
|
||||||
|
When mounting your own `playlist.xml` file to the container you overwrite a lot of
|
||||||
|
customization options that usually would be parsed from environment variables.
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<gameinfos>
|
||||||
|
<game_mode>@GAMEMODE@</game_mode>
|
||||||
|
<chat_time>@CHATTIME@</chat_time>
|
||||||
|
<finishtimeout>@FINISHTIMEOUT@</finishtimeout>
|
||||||
|
<disablerespawn>@DISABLERESPAWN@</disablerespawn>
|
||||||
|
<rounds_pointslimit>@ROUNDS_POINTSLIMIT@</rounds_pointslimit>
|
||||||
|
<team_pointslimit>@TEAM_POINTSLIMIT@</team_pointslimit>
|
||||||
|
<team_maxpoints>@TEAM_MAXPOINTS@</team_maxpoints>
|
||||||
|
<timeattack_limit>@TIMEATTACK_LIMIT@</timeattack_limit>
|
||||||
|
<timeattack_synchstartperiod>0</timeattack_synchstartperiod>
|
||||||
|
<laps_nblaps>@LAPS_NBLAPS@</laps_nblaps>
|
||||||
|
<laps_timelimit>@LAPS_TIMELIMIT@</laps_timelimit>
|
||||||
|
<cup_pointslimit>@CUP_POINTSLIMIT@</cup_pointslimit>
|
||||||
|
<cup_roundsperchallenge>@CUP_ROUNDSPERCHALLENGE@</cup_roundsperchallenge>
|
||||||
|
<cup_nbwinners>@CUP_NBWINNERS@</cup_nbwinners>
|
||||||
|
<cup_warmupduration>@CUP_WARMUPDURATION@</cup_warmupduration>
|
||||||
|
</gameinfos>
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're familiar with these options anyway, you can mount `playlist.xml` to
|
||||||
|
`/var/lib/tmserver/GameData/MatchSettings/playlist.xml` and use it as a complete
|
||||||
|
and persistent configuration file that can be written to by plugins or external tools
|
||||||
|
like RemoteCP.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Custom configuration files
|
### Custom configuration files
|
||||||
|
|
||||||
Most plugins need you to provide valid configuration files to function in the first place.
|
Most plugins need you to provide valid configuration files to function in the first place.
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
version: '3.8'
|
|
||||||
services:
|
services:
|
||||||
tmserver:
|
tmserver:
|
||||||
image: fanyx/tmserver:2.0.5
|
image: fanyx/tmserver:2.2.0
|
||||||
container_name: trackmania_tmserver
|
container_name: trackmania_tmserver
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
<connection_uploadrate>512</connection_uploadrate> <!-- Kbps (kilo bits per second) -->
|
<connection_uploadrate>512</connection_uploadrate> <!-- Kbps (kilo bits per second) -->
|
||||||
<connection_downloadrate>8192</connection_downloadrate> <!-- Kbps -->
|
<connection_downloadrate>8192</connection_downloadrate> <!-- Kbps -->
|
||||||
|
|
||||||
<force_ip_address></force_ip_address>
|
<force_ip_address>@FORCE_IP_ADDRESS@</force_ip_address>
|
||||||
<server_port>@SERVER_PORT@</server_port>
|
<server_port>@SERVER_PORT@</server_port>
|
||||||
<server_p2p_port>@SERVER_P2P_PORT@</server_p2p_port>
|
<server_p2p_port>@SERVER_P2P_PORT@</server_p2p_port>
|
||||||
<client_port>0</client_port>
|
<client_port>0</client_port>
|
||||||
|
|
|
@ -10,6 +10,7 @@ SERVER_LOGIN_PASSWORD=${SERVER_LOGIN_PASSWORD?:ERROR | ServerLoginPassword is mi
|
||||||
config+=( "SERVER_LOGIN_PASSWORD" )
|
config+=( "SERVER_LOGIN_PASSWORD" )
|
||||||
|
|
||||||
# Optional
|
# Optional
|
||||||
|
VALIDATION_KEY=${VALIDATION_KEY:-} && config+=( "VALIDATION_KEY" )
|
||||||
SERVER_SA_PASSWORD=${SERVER_SA_PASSWORD:-$(pwgen -s 24 1)} && config+=( "SERVER_SA_PASSWORD" )
|
SERVER_SA_PASSWORD=${SERVER_SA_PASSWORD:-$(pwgen -s 24 1)} && config+=( "SERVER_SA_PASSWORD" )
|
||||||
echo "INFO | SERVER_SA_PASSWORD: ${SERVER_SA_PASSWORD}"
|
echo "INFO | SERVER_SA_PASSWORD: ${SERVER_SA_PASSWORD}"
|
||||||
SERVER_ADM_PASSWORD=${SERVER_ADM_PASSWORD:-$(pwgen -s 24 1)} && config+=( "SERVER_ADM_PASSWORD" )
|
SERVER_ADM_PASSWORD=${SERVER_ADM_PASSWORD:-$(pwgen -s 24 1)} && config+=( "SERVER_ADM_PASSWORD" )
|
||||||
|
@ -18,6 +19,8 @@ SERVER_PORT=${SERVER_PORT:-2350} && config+=( "SERVER_PORT" )
|
||||||
echo "INFO | SERVER_PORT: ${SERVER_PORT}"
|
echo "INFO | SERVER_PORT: ${SERVER_PORT}"
|
||||||
SERVER_P2P_PORT=${SERVER_P2P_PORT:-3450} && config+=( "SERVER_P2P_PORT" )
|
SERVER_P2P_PORT=${SERVER_P2P_PORT:-3450} && config+=( "SERVER_P2P_PORT" )
|
||||||
echo "INFO | SERVER_P2P_PORT: ${SERVER_P2P_PORT}"
|
echo "INFO | SERVER_P2P_PORT: ${SERVER_P2P_PORT}"
|
||||||
|
FORCE_IP_ADDRESS=${FORCE_IP_ADDRESS:-${curl https://api.ipify.org}} && config += ( "FORCE_IP_ADDRESS" )
|
||||||
|
echo "INFO | FORCE_IP_ADDRESS: ${FORCE_IP_ADDRESS}"
|
||||||
SERVER_NAME=${SERVER_NAME:-Trackmania Server} && config+=( "SERVER_NAME" )
|
SERVER_NAME=${SERVER_NAME:-Trackmania Server} && config+=( "SERVER_NAME" )
|
||||||
echo "INFO | SERVER_NAME: ${SERVER_NAME}"
|
echo "INFO | SERVER_NAME: ${SERVER_NAME}"
|
||||||
SERVER_COMMENT=${SERVER_COMMENT:-This is a Trackmania Server} && config+=( "SERVER_COMMENT" )
|
SERVER_COMMENT=${SERVER_COMMENT:-This is a Trackmania Server} && config+=( "SERVER_COMMENT" )
|
||||||
|
|
|
@ -2,19 +2,23 @@
|
||||||
|
|
||||||
echo "INFO | Parsing custom playlist..."
|
echo "INFO | Parsing custom playlist..."
|
||||||
|
|
||||||
CUSTOM_PLAYLIST=${CUSTOM_PLAYLIST:-playlist.txt}
|
[[ -z "${CUSTOM_PLAYLIST}" ]] && \
|
||||||
|
echo "INFO | Custom Playlist is not enabled, keeping default or user-edited playlist" && \
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
PLAYLIST_PATH=${PLAYLIST_PATH:-playlist.txt}
|
||||||
PLAYLIST_FILE='GameData/Tracks/MatchSettings/playlist.xml'
|
PLAYLIST_FILE='GameData/Tracks/MatchSettings/playlist.xml'
|
||||||
|
|
||||||
if [[ -f "${CUSTOM_PLAYLIST}" ]]; then
|
if [[ -f "${PLAYLIST_PATH}" ]]; then
|
||||||
count=1
|
count=1
|
||||||
while read l; do
|
while read l; do
|
||||||
xmlstarlet ed -L -s /playlist -t elem -n challenge $PLAYLIST_FILE
|
xmlstarlet ed -L -s /playlist -t elem -n challenge $PLAYLIST_FILE
|
||||||
xmlstarlet ed -L -s "/playlist/challenge[${count}]" -t elem -n file -v "${l}" $PLAYLIST_FILE
|
xmlstarlet ed -L -s "/playlist/challenge[${count}]" -t elem -n file -v "${l}" $PLAYLIST_FILE
|
||||||
count=$((count+1))
|
count=$((count+1))
|
||||||
done < $CUSTOM_PLAYLIST
|
done < $PLAYLIST_PATH
|
||||||
else
|
else
|
||||||
xmlstarlet ed -L -s /playlist -t elem -n challenge $PLAYLIST_FILE
|
xmlstarlet ed -L -s /playlist -t elem -n challenge $PLAYLIST_FILE
|
||||||
xmlstarlet ed -L -s "playlist/challenge[1]" -t elem -n file -v "Challenges/Nadeo/A01-Race.Challenge.Gbx" $PLAYLIST_FILE
|
xmlstarlet ed -L -s "playlist/challenge[1]" -t elem -n file -v "Challenges/Nadeo/A01-Race.Challenge.Gbx" $PLAYLIST_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "INFO | Finished parsing playlist files."
|
echo "INFO | Finished parsing playlist files"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
jfreu.lite.php
|
||||||
|
jfreu.chat.php
|
Loading…
Reference in New Issue