@@ -0,0 +1,83 @@
|
||||
# doka-lobby
|
||||
|
||||
Web UI for Dota 2 joinable custom lobbies from the game coordinator.
|
||||
|
||||
The app keeps the latest lobby snapshot in memory, refreshes it every 3 minutes, and streams updates to the browser. There is no database. Steam account credentials and the refresh token can be persisted on a PVC.
|
||||
|
||||
## Local run
|
||||
|
||||
```powershell
|
||||
npm install
|
||||
$env:AUTH_ADMIN_PASSWORD = "admin-password"
|
||||
npm start
|
||||
```
|
||||
|
||||
Open:
|
||||
|
||||
```text
|
||||
http://localhost:3000
|
||||
```
|
||||
|
||||
Use `/admin` to enter the admin password, save Steam credentials, and submit a Steam Guard code when Steam asks for it.
|
||||
|
||||
## Kubernetes configuration
|
||||
|
||||
Mount a PVC to `/data` and set:
|
||||
|
||||
```yaml
|
||||
env:
|
||||
- name: AUTH_ADMIN_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: doka-lobby-admin
|
||||
key: password
|
||||
- name: STEAM_AUTH_FILE
|
||||
value: /data/.steam-auth.json
|
||||
- name: STEAM_CREDENTIALS_FILE
|
||||
value: /data/.steam-credentials.json
|
||||
- name: PORT
|
||||
value: "3000"
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
```
|
||||
|
||||
Run one replica only. A single Steam account should not be used by multiple pods at once.
|
||||
|
||||
## Auth files
|
||||
|
||||
- `.steam-credentials.json` stores the Steam account name and password saved from `/admin`.
|
||||
- `.steam-auth.json` stores the Steam refresh token emitted by `steam-user`.
|
||||
- Both files are ignored by git and Docker build context.
|
||||
|
||||
If the refresh token is still valid, restarts use it. If it is missing or expired, the app falls back to the saved Steam account/password and may ask for Steam Guard again.
|
||||
|
||||
## Docker image CI
|
||||
|
||||
GitHub Actions builds and pushes:
|
||||
|
||||
```text
|
||||
ultradesu/doka2-lobby-list
|
||||
```
|
||||
|
||||
Configure repository secrets:
|
||||
|
||||
- `DOCKERHUB_USERNAME`
|
||||
- `DOCKERHUB_TOKEN`
|
||||
|
||||
The workflow publishes `latest` on the default branch, branch/tag refs, and `sha-*` tags.
|
||||
|
||||
## Options
|
||||
|
||||
```powershell
|
||||
node index.js --port 3001
|
||||
node index.js --region 3
|
||||
node index.js --game-id 123456789
|
||||
node index.js --refresh-ms 180000
|
||||
```
|
||||
|
||||
One-shot console mode:
|
||||
|
||||
```powershell
|
||||
node index.js --once --map "ffa"
|
||||
```
|
||||
Reference in New Issue
Block a user