From 370ccf6089dc5b20831c8ea6070c90402eda0aab Mon Sep 17 00:00:00 2001 From: Hendrik Boll Date: Sun, 12 May 2019 19:21:16 +0200 Subject: [PATCH 1/6] cleaned up entrypoint-xaseco.sh : --- docker-xaseco/entrypoint-xaseco.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-xaseco/entrypoint-xaseco.sh b/docker-xaseco/entrypoint-xaseco.sh index 230ea0e..6c659a9 100755 --- a/docker-xaseco/entrypoint-xaseco.sh +++ b/docker-xaseco/entrypoint-xaseco.sh @@ -4,7 +4,7 @@ set -e # Sleep for 30 seconds to wait for trackmania server -sleep 30 +sleep 10 if [[ -e /etc/xaseco/env ]] @@ -58,4 +58,5 @@ sed -i -e "s/--\$DB_HOST--/$DB_HOST/" \ -e "s/--\$DB_NAME--/$DB_NAME/" \ /opt/xaseco/localdatabase.xml -exec "php" "opt/xaseco/aseco.php" "TMNF" "aseco.log" "2>&1" +exec "/usr/bin/php" "/opt/xaseco/aseco.php" "TMNF" "aseco.log" "2>&1" +exec "cat" "/opt/xaseco/aseco.log" From 96fa8ef80ab23417fcc087d37cf0f3bfa926cef3 Mon Sep 17 00:00:00 2001 From: Hendrik Boll Date: Sun, 12 May 2019 19:26:55 +0200 Subject: [PATCH 2/6] removed xml comment tag from MasterAdmin entry --- docker-xaseco/xaseco/config.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-xaseco/xaseco/config.xml b/docker-xaseco/xaseco/config.xml index a35c6d0..c897857 100644 --- a/docker-xaseco/xaseco/config.xml +++ b/docker-xaseco/xaseco/config.xml @@ -5,9 +5,7 @@ - From 95d00cc8c27b3628714043750dc3fb856f3af793 Mon Sep 17 00:00:00 2001 From: Hendrik Boll Date: Sun, 12 May 2019 19:37:45 +0200 Subject: [PATCH 3/6] fixed the database construction in plugins/plugin.localdatabase.php --- docker-xaseco/entrypoint-xaseco.sh | 8 +------- docker-xaseco/xaseco/plugins/plugin.localdatabase.php | 5 +++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docker-xaseco/entrypoint-xaseco.sh b/docker-xaseco/entrypoint-xaseco.sh index 6c659a9..6e59a5a 100755 --- a/docker-xaseco/entrypoint-xaseco.sh +++ b/docker-xaseco/entrypoint-xaseco.sh @@ -13,11 +13,6 @@ then fi # Evaluate the available environment variables -if [[ -z "${MASTERADMIN_LOGIN}" ]] -then - echo "No ingame MasterAdmin was specified." - MASTERADMIN_LOGIN="_placeholder_" -fi if [[ -z "${SERVER_SA_PASSWORD}" ]] then echo "No SuperAdmin password was specified. Xaseco cannot build a connection without this information." @@ -49,8 +44,7 @@ fi #Xaseco Files -sed -i -e "s/--\$MASTERADMIN_LOGIN--/$MASTERADMIN_LOGIN/" \ - -e "s/--\$SERVER_SA_PASSWORD--/$SERVER_SA_PASSWORD/" \ +sed -i -e "s/--\$SERVER_SA_PASSWORD--/$SERVER_SA_PASSWORD/" \ /opt/xaseco/config.xml sed -i -e "s/--\$DB_HOST--/$DB_HOST/" \ -e "s/--\$DB_LOGIN--/$DB_LOGIN/" \ diff --git a/docker-xaseco/xaseco/plugins/plugin.localdatabase.php b/docker-xaseco/xaseco/plugins/plugin.localdatabase.php index 14e9c31..2342a3d 100644 --- a/docker-xaseco/xaseco/plugins/plugin.localdatabase.php +++ b/docker-xaseco/xaseco/plugins/plugin.localdatabase.php @@ -88,6 +88,7 @@ function ldb_connect($aseco) { $query = "CREATE TABLE IF NOT EXISTS `challenges` ( `Id` mediumint(9) NOT NULL auto_increment, `Uid` varchar(27) NOT NULL default '', + `Date` datetime NOT NULL default '1970-01-01 00:00:00', `Name` varchar(100) NOT NULL default '', `Author` varchar(30) NOT NULL default '', `Environment` varchar(10) NOT NULL default '', @@ -102,7 +103,7 @@ function ldb_connect($aseco) { `Game` varchar(3) NOT NULL default '', `NickName` varchar(100) NOT NULL default '', `Nation` varchar(3) NOT NULL default '', - `UpdatedAt` datetime NOT NULL default '0000-00-00 00:00:00', + `UpdatedAt` datetime NOT NULL default '1970-01-01 00:00:00', `Wins` mediumint(9) NOT NULL default 0, `TimePlayed` int(10) unsigned NOT NULL default 0, `TeamName` char(60) NOT NULL default '', @@ -117,7 +118,7 @@ function ldb_connect($aseco) { `ChallengeId` mediumint(9) NOT NULL default 0, `PlayerId` mediumint(9) NOT NULL default 0, `Score` int(11) NOT NULL default 0, - `Date` datetime NOT NULL default '0000-00-00 00:00:00', + `Date` datetime NOT NULL default '1970-01-01 00:00:00', `Checkpoints` text NOT NULL, PRIMARY KEY (`Id`), UNIQUE KEY `PlayerId` (`PlayerId`,`ChallengeId`), From 6e02d281608d4b08375f35c7f6839c6a4f059b12 Mon Sep 17 00:00:00 2001 From: Hendrik Boll Date: Sun, 12 May 2019 19:40:24 +0200 Subject: [PATCH 4/6] disabled dedimania per default --- docker-xaseco/xaseco/plugins.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-xaseco/xaseco/plugins.xml b/docker-xaseco/xaseco/plugins.xml index baad696..8238ef3 100644 --- a/docker-xaseco/xaseco/plugins.xml +++ b/docker-xaseco/xaseco/plugins.xml @@ -7,7 +7,7 @@ chat.records.php chat.records2.php chat.recrels.php - chat.dedimania.php + chat.players.php chat.players2.php chat.wins.php @@ -21,7 +21,7 @@ plugin.tmxinfo.php plugin.track.php plugin.checkpoints.php - plugin.dedimania.php + plugin.rasp.php plugin.rasp_jukebox.php plugin.rasp_chat.php From 6fcdf6c0e8cdbe28fbe5ef756c8db7c0ac600836 Mon Sep 17 00:00:00 2001 From: ryluth <38672086+ryluth@users.noreply.github.com> Date: Sun, 12 May 2019 22:19:06 +0200 Subject: [PATCH 5/6] Update README.md --- README.md | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 3fc7e16..f1454f1 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,34 @@ # docker-tmserver -Docker image for simple or customizable Trackmania Nations Forever server +Docker images for simple or customizable Trackmania Nations Forever server. -## How to use this image -```docker run -e {required environment variables} -p {selected ports} fanyx/tmserver``` +## How to use this repo: +Run the images in this repo with `docker-compose`. +I've included a template [`docker-compose.yml`](https://github.com/ryluth/docker-tmserver/blob/master/docker-compose.yml) in this repo to get you going. -### There are several required environment variables that you need to set: - - `$SERVER_LOGIN` | Server account login - - `$SERVER_LOGIN_PASSWORD` | Server account password +### Required: + #### tmserver: + - `$SERVER_LOGIN` | Server account login + - `$SERVER_LOGIN_PASSWORD` | Server account password + - `$SERVER_SA_PASSWORD` | Password for SuperAdmin credential + - `$SERVER_ADM_PASSWORD` | Password for Admin credential + #### xaseco: + - `$SERVER_SA_PASSWORD` | Password for SuperAdmin credential + - `$DB_HOST` | -> subject to deletion since i'm gonna lock it down + - `$DB_LOGIN` | ^ + - `$DB_LOGIN_PASSWORD` | ^ + - `$DB_NAME` | ^ ### Optional environment variables are: - - `$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 - -## Running this image with `docker-compose` -I have a default [`docker-compose.yml`](https://github.com/ryluth/docker-tmserver/blob/master/docker-compose.yml) included in this repository. -You can adjust this file to your needs but running with docker-compose is more comfortable in general. - + #### tmserver: + - `$SERVER_PORT` | Port for server communications -> Default : 2350 + - `$SERVER_P2P_PORT` | Port for peer2peer communication -> Default : 3450 + - `$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 + ## Configuring the Trackmania server Without manual configuration the server launches with Nadeo's default config. -This means round based driving. To configure the server on your own demands edit the `config.txt` file in `tmserver/GameData/Config`. To configure the tracklist edit the `playlist.txt` in `tmserver/GameData/Tracks/MatchSettings/`. - -## Further information -You can open volumes to the Trackmania server files and Xaseco files (`docker-compose` does this per default) and edit configuration files. -This is needed since the default track playlist just runs the white Nadeo tracks so i advise examining the config volumes to adjust the track playlist. -Furthermore you can edit the Xaseco plugins to your need and adjust ingame administrator accounts and so on. +**IMPORTANT!!** +After making changes to the server configuration run `docker-compose build` to rebuild the container images, otherwise the changes won't be in effect. From 07484a3185591263121bfe9088f6f0ce0268177f Mon Sep 17 00:00:00 2001 From: ryluth <38672086+ryluth@users.noreply.github.com> Date: Sun, 12 May 2019 22:20:24 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f1454f1..fd7d79d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Docker images for simple or customizable Trackmania Nations Forever server. ## How to use this repo: -Run the images in this repo with `docker-compose`. +Run the images in this repo with `docker-compose`. I've included a template [`docker-compose.yml`](https://github.com/ryluth/docker-tmserver/blob/master/docker-compose.yml) in this repo to get you going. ### Required: @@ -27,8 +27,8 @@ I've included a template [`docker-compose.yml`](https://github.com/ryluth/docker - `$SERVER_PASSWORD` | If you want to secure your server against unwanted logins, set a server password ## Configuring the Trackmania server -Without manual configuration the server launches with Nadeo's default config. -To configure the server on your own demands edit the `config.txt` file in `tmserver/GameData/Config`. -To configure the tracklist edit the `playlist.txt` in `tmserver/GameData/Tracks/MatchSettings/`. -**IMPORTANT!!** -After making changes to the server configuration run `docker-compose build` to rebuild the container images, otherwise the changes won't be in effect. +Without manual configuration the server launches with Nadeo's default config. +To configure the server on your own demands edit the `config.txt` file in `tmserver/GameData/Config`. +To configure the tracklist edit the `playlist.txt` in `tmserver/GameData/Tracks/MatchSettings/`. +**IMPORTANT!!** +After making changes to the server configuration run `docker-compose build` to rebuild the container images, otherwise the changes won't be in effect.