You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[match specific access tokens](#match-specific-access-tokens)
22
55
-[Development](#development)
23
56
-[Docker](#docker)
24
-
-[Directly with NodeJs](#directly-with-nodejs)
57
+
-[NodeJS](#nodejs)
25
58
26
-
## Run with Docker
59
+
## Getting Started
27
60
28
61
TMT2 is available on docker hub: https://hub.docker.com/r/jensforstmann/tmt2
29
62
30
63
Run it with:
31
64
32
-
docker run -p 8080:8080 jensforstmann/tmt2
65
+
```sh
66
+
docker run --name tmt2 -d -p 8080:8080 jensforstmann/tmt2
67
+
```
33
68
34
-
Data will be written to `/app/backend/storage` (can be configured). To keep the files with different containers you can either specify a docker volume or a path on the local system:
69
+
Data will be written within the container to `/app/backend/storage`. To keep the files with different containers you can either specify a docker volume or a path on the local system:
35
70
36
-
docker run -v dockerVolumeName:/app/storage -p 8080:8080 jensforstmann/tmt2
71
+
```sh
72
+
# docker volume
73
+
docker run --name tmt2 -d -p 8080:8080 -v dockerVolumeName:/app/storage jensforstmann/tmt2
37
74
38
-
docker run -v /home/tmt2/storage:/app/storage -p 8080:8080 jensforstmann/tmt2
75
+
# local host directory
76
+
docker run --name tmt2 -d -p 8080:8080 -v /home/tmt2/storage:/app/storage jensforstmann/tmt2
77
+
```
39
78
40
79
The matches which are neither finished nor stopped will be loaded on application start.
41
80
81
+
### Create you first Match
82
+
83
+
After running the container you can open the web frontend: http://localhost:8080 (or at whatever ip/server your docker container runs on.)
84
+
85
+
86
+
87
+
_Example screenshot: Create a new match from the web frontend (both dark and light mode available):_
88
+

89
+
90
+
91
+
92
+
Even without an admin token you can create and manage matches (but only your own ones). If you want to know your admin token (a random one is generated at startup) either take a look at the `access_tokens.json` file or take a look at the first lines of the log outpout (`docker logs tmt2`).
93
+
94
+
95
+
### Ingame Chat Commands
96
+
97
+
While TMT watches a match the player ingame can use chat commands to communicate with TMT:
98
+
99
+
-`.team a` or `.team b` - you need to choose a team before you can execute any other commands, check the response in the chat to be sure you've joined the right one, also check the scoreboard (team names are visible there) if you're on the right side (CT/T)
100
+
- during the map election process:
101
+
-`.ban` - ban a map from the map pool
102
+
-`.pick` - pick a map to be played
103
+
-`.agree` - agree on a map together with the opponent (alias `.map`)
104
+
-`.ct`/`.t` - select CT/T as your starting side
105
+
-`.restart` - restart the eleciton process
106
+
- during and after the knife round (if one takes place)
107
+
-`.restart` - restart the knife round
108
+
-`.ct`/`.t` - select CT/T as your starting side
109
+
-`.stay` - stay on your side
110
+
-`.switch` - switch the sides (alias `.swap`)
111
+
- during the warmup
112
+
-`.ready` - set your team as ready (alias `.rdy`)
113
+
-`.unready` - set your team as not ready (alias `.unrdy`)
114
+
- during the match
115
+
-`.pause` - pause the match at the next freezetime
116
+
-`.unpause` - set your team as ready (alias `.ready` & `.rdy`)
117
+
118
+
42
119
43
120
## Configuration
44
121
@@ -64,7 +141,7 @@ TMT_SAY_PREFIX="[TMT] "
64
141
65
142
See [`backend/swagger.json`](backend/swagger.json). You might want to copy its content and paste it into https://editor.swagger.io/.
66
143
67
-
See also the [`examples`](examples)folder.
144
+
See also the [`examples`](examples) folder.
68
145
69
146
## Security / Authentication
70
147
@@ -124,6 +201,8 @@ After starting the dev processes you can reach the backend & frontend at:
124
201
125
202
## Docker
126
203
204
+
Docker is recommended as it's easy to use and doesn't require any other software to be installed (if docker is already set up).
205
+
127
206
> Note for windows user: It's recommended to have docker installed **directly within** WSL (not using Windows Docker from WSL) or to run a Linux VM.
128
207
129
208
Init the dev environment:
@@ -136,7 +215,9 @@ Start a docker container with port forwarding and hot reloading:
136
215
137
216
138
217
139
-
## Directly with NodeJs
218
+
## NodeJS
219
+
220
+
If you don't want to use docker or want to use NodeJS directly, you can do the following to setup a dev environment:
140
221
141
222
Install dependencies:
142
223
@@ -157,3 +238,7 @@ Run frontend with hot realoding:
157
238
npm run dev
158
239
159
240
241
+
242
+
---
243
+
244
+
> This project is a complete rewrite of the former [TMT](https://github.com/JensForstmann/CSGO-PHP-TournamentMatchTracker).
0 commit comments