mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-02 17:32:50 +08:00
Add Docker deployment and fix crash in insecure (non-HTTPS) contexts
Adds a multi-stage Dockerfile (Rust connector + gateway + web build) and docker-compose.yml for running the whole stack as a single container behind a reverse proxy; the gateway now serves the built web app and the WebSocket endpoint (/ws) from one port, and the frontend derives its gateway URL from window.location in production instead of a hardcoded localhost address. Also guards all navigator.mediaDevices usage against being undefined, which happens when the page is loaded over plain HTTP on a non-localhost address (not a secure context) - previously this crashed the whole React app on mount instead of just disabling the affected voice features.
This commit is contained in:
1 parent
3715a52de6
commit
c48534dbc4
8 files changed
+129
-8
No files matched your search
@@ -0,0 +1,6 @@
|
||||
services:
|
||||
ts-web-client:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
Reference in new issue
Block a user