docker-tmserver/README.md

109 lines
3.8 KiB
Markdown
Raw Normal View History

2019-09-17 19:58:11 +02:00
# docker-tmserver
Docker image for simple or customizable Trackmania Nations Forever server
## How to use this image
2019-09-17 20:04:20 +02:00
`docker run -e {required environment variables} -p {selected ports} fanyx/tmserver`
2019-09-17 19:58:11 +02:00
### There are several required environment variables that you need to set:
2019-09-17 19:59:28 +02:00
```
2019-09-17 19:58:11 +02:00
- $SERVER_LOGIN | Server account login
- $SERVER_LOGIN_PASSWORD | Server account password
2019-09-17 19:59:28 +02:00
```
2019-09-17 19:58:11 +02:00
### Optional environment variables are:
2019-09-17 20:00:37 +02:00
```
2019-09-17 19:58:11 +02:00
- $SERVER_PORT | Port for server communications -> Default : 2350
- $SERVER_P2P_PORT | Port for peer2peer communication -> Default : 3450
- $SERVER_SA_PASSWORD | Password for SuperAdmin credential -> when left empty will be randomly generated
- $SERVER_ADM_PASSWORD | Password for Admin credential -> when left empty will be randomly generated
- $SERVER_NAME | Server name in ingame browser -> Default : "Trackmania Server"
- $SERVER_COMMENT | Server description -> Default : "This is a Trackmania Server"
- $SERVER_PASSWORD | If you want to secure your server against unwanted logins, set a server password
2019-09-17 19:59:28 +02:00
```
2019-09-17 19:58:11 +02:00
## Running this image with `docker-compose`
2020-08-28 11:27:30 +02:00
I have a default [`docker-compose.yml`](./docker-compose.yml) included in this repository.
2019-09-17 19:58:11 +02:00
You can adjust this file to your needs but running with docker-compose is more comfortable in general.
## Configuring the Trackmania server
Without manual configuration the server launches with Nadeo's default config.
This means round based driving.
2019-09-17 20:27:06 +02:00
Other configuration options are listed below:
```
- $GAMEMODE | 0 (Rounds), 1 (TimeAttack), 2 (Team), 3 (Laps), 4 (Stunts) -> Default : 1
- $CHATTIME | chat time value in milliseconds -> Default : 10000
- $FINISHTIMEOUT | finish timeout value in milliseconds. 0 means classic, 1 means adaptive -> Default : 1
- $DISABLERESPAWN | 0 (respawns enabled), 1 (respawns disabled) -> Default : 0
```
#### Gamemode : Rounds
```
- $ROUNDS_POINTSLIMIT | points limit for rounds mode -> Default : 30
```
#### Gamemode : TimeAttack
```
- $TIMEATTACK_LIMIT | time limit in milliseconds for time attack mode -> Default : 180000
```
#### Gamemode : Team
```
- $TEAM_POINTSLIMIT | points limit for team mode -> Default : 50
- $TEAM_MAXPOINTS | number of maximum points per round for team mode -> Default : 6
```
#### Gamemode : Laps
```
- $LAPS_NBLAPS | number of laps for laps mode -> Default : 5
- $LAPS_TIMELIMIT | time limit in milliseconds for laps mode -> Default : 0
```
2019-09-28 12:04:20 +02:00
2020-01-05 15:25:03 +01:00
### Running custom tracks
While the Nadeo tracks are available in this repository and accessible under `GameData/Tracks/Challenges/Nadeo/` you can also run custom tracks following the instructions below.
You can run custom tracks by mounting a volume from where your tracks are stored to `/opt/tmserver/GameData/Tracks/Custom`.
In this example i am storing my tracks in `./tracks` relative to the docker-compose file.
```
[...]
tmserver:
image: fanyx/tmserver:latest
[...]
volumes:
- ./tracks:/opt/tmserver/GameData/Tracks/Custom
[...]
```
### Running a custom playlist
2019-09-28 13:10:42 +02:00
You can add tracks to a playlist in a simple way. Just provide a `playlist.txt` that contains every track in a certain format. Create a folder next to your `docker-compose.yml`, mount it as a volume to `/opt/tmserver/playlist` and put the `playlist.txt` in there.
The tracks for the server are stored relative to `/opt/tmserver/GameData/Tracks`. Creating your own playlist is as easy as specifying each track on a separate line in the `playlist.txt` adressed by its relative path to the `Tracks` folder.
#### Example:
Folder structure:
```
|--> docker-compose.yml
|--> ./tracks
|--> ./db-data
`--> ./playlist
`--> playlist.txt
```
playlist.txt :
```
Challenges/Nadeo/C01-Race.Challenge.Gbx
Custom/mini01.Challenge.Gbx
Custom/SpeedxZxZ.Challenge.Gbx
```