@@ -43,93 +43,41 @@ Visit [https://stats.resamvi.io](https://stats.resamvi.io) to see yourself.
43
43
44
44
infclass-stats runs on Port ` 8000 ` so make sure it is free.
45
45
46
- Fill the <..> with your information:
46
+ Fill the environment variables with your information:
47
47
48
- ` autoexec.cfg ` of the teeworlds server
48
+ ` autoexec.cfg `
49
49
```
50
- ec_bindaddr <ip >
51
- ec_port <port >
52
- ec_password <password >
50
+ ec_bindaddr <myip >
51
+ ec_port <myport >
52
+ ec_password <mypassword >
53
53
ec_output_level 2
54
54
```
55
55
56
- Set up your ` config/config.go ` of infclass-stats
56
+ ` docker-compose.yml ` should match the above
57
57
```
58
- SERVER_IP = "<ip>"
59
-
60
- ECON_PORT = "<port>"
61
-
62
- ECON_PASSWORD = "<password>"
63
-
64
- ...
65
-
66
- MYSQL_USER = "<mysql user>"
67
-
68
- MYSQL_PASSWORD = "<mysql password>"
58
+ - SERVER_IP=<myip>
59
+ - ECON_PORT=<myport>
60
+ - ECON_PASSWORD=<mypassword>
69
61
```
70
62
71
- Setup a database named "infclass"
72
-
73
- Replace the IP in ` web/src/App.vue `
74
- ```
75
- const ws = new WebSocket('ws://<ip>:8000/');
63
+ ` web/Dockerfile `
76
64
```
77
-
78
- Then run
79
-
65
+ ENV VUE_APP_API_URL="wss://inf.resamvi.io:8001"
80
66
```
81
- go run main.go
82
- ```
83
-
84
- or
85
-
86
- ```
87
- ./start.sh
88
- ```
89
- which does the above repeatedly (helps recovering, when server crashes)
90
-
91
-
92
- # Config
93
-
94
- # SSL
95
67
96
- This implementation uses SSL. If you want to skip (easier testing) this step then:
68
+ I'm using [ Plausible] ( https://plausible.io/ ) .
69
+ If you host this yourself you may want to stop the app from sending user stats:
97
70
98
- Change ` wss ` to ` ws ` in ` App.vue `
71
+ ` web/public/index.html `
72
+ ``` diff
73
+ ...
74
+ <title>InfClass Statistics</title>
99
75
100
- ```
101
- const ws = new WebSocket('ws://localhost:8000/subscribe');
76
+ - <script async defer data-domain="stats.resamvi.io" src="https://pls.resamvi.io/js/pls.js"></script>
77
+ </head>
102
78
```
103
79
104
- If you plan to use SSL create a symlink to the project root
105
-
106
- ```
107
- ln -s /etc/letsencrypt/live/<url>/fullchain.pem ~/infclass-stats/fullchain.pem
108
- ln -s /etc/letsencrypt/live/<url>/privkey.pem ~/infclass-stats/privkey.pem
109
- ```
110
80
111
81
# How to make sure your Infclass mod is compatible with infclass-stats
112
82
113
- TODO
114
-
115
- Copy in what message logs are required 'Protocol'
116
-
117
- # TODO
118
-
119
- - Remove logs and fmts where possible
120
-
121
- # Website
122
-
123
- 1 . Install dependencies
124
-
125
- ```
126
- yarn install
127
- ```
128
-
129
- 2 . Build artifacts`
130
-
131
- ```
132
- yarn run build
133
- ```
134
-
135
- 3 . Move ` dist ` to ` /var/www/ ` or appropriate place
83
+ TODO: Copy in what message logs are required 'Protocol'
0 commit comments