From 6a0ba6f732e2c5dbd75d45698e161b4af540c3b1 Mon Sep 17 00:00:00 2001 From: Moepchi Date: Thu, 30 Jul 2026 18:26:15 +0200 Subject: [PATCH] Merge INSTALL.md into README with a Docker-first install section Add a Docker Compose (build-from-source) and a Docker Hub pull path as the recommended install method, with the previous manual/from-source steps kept as a collapsible section for anyone without Docker. --- INSTALL.md | 87 ------------------------------------------- README.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 99 insertions(+), 95 deletions(-) delete mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md deleted file mode 100644 index 410ca79..0000000 --- a/INSTALL.md +++ /dev/null @@ -1,87 +0,0 @@ -# Installation - -## Prerequisites - -- **Node.js** 20+ and npm -- **Rust** (stable toolchain) — [rustup.rs](https://rustup.rs) -- **CMake** and a C/C++ toolchain — needed to build the Opus codec library - (`audiopus_sys`) used for voice. On Windows, the Visual Studio "Desktop - development with C++" workload covers this; on Linux, install `cmake` and - `build-essential` (or equivalent); on macOS, `cmake` via Homebrew plus Xcode - command line tools. -- **git** - -## 1. Clone the repository - -The Rust connector depends on the `tsclientlib` crate, vendored as a git -submodule — make sure to pull it in too: - -```bash -git clone --recurse-submodules -cd ts-web-client -``` - -If you already cloned without `--recurse-submodules`: - -```bash -git submodule update --init --recursive -``` - -## 2. Build the Rust connector - -```bash -cd connector -cargo build -``` - -> **Note:** if the build fails with a CMake error like `Compatibility with -> CMake < 3.5 has been removed`, it's because the vendored Opus source uses an -> old `cmake_minimum_required`. Work around it with: -> -> ```bash -> CMAKE_POLICY_VERSION_MINIMUM=3.5 cargo build -> ``` -> (On Windows PowerShell: `$env:CMAKE_POLICY_VERSION_MINIMUM = "3.5"; cargo build`) - -This produces `connector/target/debug/ts-connector` (or `ts-connector.exe` on -Windows), which the gateway spawns automatically — no manual step needed -after this. - -## 3. Install and start the gateway - -```bash -cd gateway -npm install -npm run dev -``` - -This starts the WebSocket gateway on `ws://localhost:8080`. - -## 4. Install and start the web frontend - -In a separate terminal: - -```bash -cd web -npm install -npm run dev -``` - -Vite will print a local dev URL (typically `http://localhost:5173`) — open -it in a browser. - -## 5. Connect - -In the web UI, enter the address of a TeamSpeak server and a nickname, then -click **Connect**. Voice requires microphone permission when you enable the -mic button; the output-device picker (if your browser supports it) requires -no extra permission. - -## Rebuilding after changes - -- Frontend and gateway changes hot-reload automatically (`npm run dev` in - both cases). -- Connector changes require a rebuild (`cargo build` in `connector/`) and a - reconnect from the browser — if the old `ts-connector` binary is still - running (an active browser connection), disconnect first or the build will - fail to overwrite the binary. diff --git a/README.md b/README.md index 0178709..7529f03 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@

- 🚀 Quick Start · - 📖 Installation · + 🚀 Quick Start · + 📖 Installation · 🐛 Report Bug

@@ -87,19 +87,110 @@ Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Ru -## 🚀 Quick Start +## 🚀 Installation -Spin up the whole stack with Docker Compose: +### 🐳 Docker (recommended) + +Clone the repo (the Rust connector depends on a git submodule, so pull it in too) and spin up the whole stack with Docker Compose: ```bash +git clone --recurse-submodules https://github.com/Moepchi/webspeak3.git +cd webspeak3 docker compose up -d ``` -That's it — open `http://localhost:8080` (or your configured port/reverse -proxy) and connect to any TeamSpeak 3 server. +That's it — the container builds the frontend, gateway, and Rust connector for you. Open `http://localhost:8080` (or your configured port) and connect to any TeamSpeak 3 server. -For manual/non-Docker setup, environment variables, and reverse-proxy notes, -see the full [Installation Guide](INSTALL.md). +Port publishing is deployment-specific — set it in a local, gitignored `docker-compose.override.yml`: + +```yaml +services: + webspeak3: + ports: + - "8080:8080" +``` + +Prefer to skip the build entirely? A prebuilt image is published on [Docker Hub](https://hub.docker.com/r/moepchi/webspeak3): + +```bash +docker run -d -p 8080:8080 --name webspeak3 moepchi/webspeak3:latest +``` + +
+🛠️ Manual installation (without Docker) + +
+ +**Prerequisites** + +- **Node.js** 20+ and npm +- **Rust** (stable toolchain) — [rustup.rs](https://rustup.rs) +- **CMake** and a C/C++ toolchain — needed to build the Opus codec library (`audiopus_sys`) used for voice. On Windows, the Visual Studio "Desktop development with C++" workload covers this; on Linux, install `cmake` and `build-essential` (or equivalent); on macOS, `cmake` via Homebrew plus Xcode command line tools. +- **git** + +**1. Clone the repository** + +The Rust connector depends on the `tsclientlib` crate, vendored as a git submodule — make sure to pull it in too: + +```bash +git clone --recurse-submodules https://github.com/Moepchi/webspeak3.git +cd webspeak3 +``` + +If you already cloned without `--recurse-submodules`: + +```bash +git submodule update --init --recursive +``` + +**2. Build the Rust connector** + +```bash +cd connector +cargo build +``` + +> **Note:** if the build fails with a CMake error like `Compatibility with CMake < 3.5 has been removed`, it's because the vendored Opus source uses an old `cmake_minimum_required`. Work around it with: +> +> ```bash +> CMAKE_POLICY_VERSION_MINIMUM=3.5 cargo build +> ``` +> (On Windows PowerShell: `$env:CMAKE_POLICY_VERSION_MINIMUM = "3.5"; cargo build`) + +This produces `connector/target/debug/ts-connector` (or `ts-connector.exe` on Windows), which the gateway spawns automatically — no manual step needed after this. + +**3. Install and start the gateway** + +```bash +cd gateway +npm install +npm run dev +``` + +This starts the WebSocket gateway on `ws://localhost:8080`. + +**4. Install and start the web frontend** + +In a separate terminal: + +```bash +cd web +npm install +npm run dev +``` + +Vite will print a local dev URL (typically `http://localhost:5173`) — open it in a browser. + +**5. Connect** + +In the web UI, enter the address of a TeamSpeak server and a nickname, then click **Connect**. Voice requires microphone permission when you enable the mic button; the output-device picker (if your browser supports it) requires no extra permission. + +**Rebuilding after changes** + +- Frontend and gateway changes hot-reload automatically (`npm run dev` in both cases). +- Connector changes require a rebuild (`cargo build` in `connector/`) and a reconnect from the browser — if the old `ts-connector` binary is still running (an active browser connection), disconnect first or the build will fail to overwrite the binary. + +
## Credits