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.
This commit is contained in:
Moepchi committed 2026-07-30 18:26:15 +02:00
1 parent 6158779184
commit 6a0ba6f732
2 files changed
+99 -95

No files matched your search

-87
View File
@@ -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 <your-repo-url>
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.
+99 -8
View File
@@ -17,8 +17,8 @@
</p>
<p align="center">
<a href="#-quick-start">🚀 Quick Start</a> ·
<a href="INSTALL.md">📖 Installation</a> ·
<a href="#-installation">🚀 Quick Start</a> ·
<a href="#-installation">📖 Installation</a> ·
<a href="https://github.com/Moepchi/webspeak3/issues">🐛 Report Bug</a>
</p>
@@ -87,19 +87,110 @@ Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Ru
</details>
## 🚀 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
```
<details>
<summary><b>🛠️ Manual installation (without Docker)</b></summary>
<br>
**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.
</details>
## Credits