feat(streaming): add local TURN relay support
This commit is contained in:
@@ -1,4 +1,27 @@
|
||||
services:
|
||||
coturn:
|
||||
image: coturn/coturn:4.6.3
|
||||
# Local development default. If camera/client are on other devices, replace 127.0.0.1
|
||||
# in TURN_URLS/VITE_TURN_URLS and --external-ip with the host machine's LAN IP.
|
||||
command:
|
||||
- -n
|
||||
- --log-file=stdout
|
||||
- --realm=securecam.local
|
||||
- --fingerprint
|
||||
- --lt-cred-mech
|
||||
- --user=securecam:securecamturn
|
||||
- --listening-port=3478
|
||||
- --listening-ip=0.0.0.0
|
||||
- --relay-ip=0.0.0.0
|
||||
- --external-ip=127.0.0.1
|
||||
- --min-port=49160
|
||||
- --max-port=49200
|
||||
ports:
|
||||
- "3478:3478"
|
||||
- "3478:3478/udp"
|
||||
- "49160-49200:49160-49200/udp"
|
||||
restart: unless-stopped
|
||||
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
@@ -54,6 +77,9 @@ services:
|
||||
MEDIA_MAX_SUBSCRIBERS_PER_ROOM: 12
|
||||
ADMIN_USERNAME: admin
|
||||
ADMIN_PASSWORD: strong-password
|
||||
TURN_URLS: turn:localhost:3478?transport=udp,turn:localhost:3478?transport=tcp
|
||||
TURN_USERNAME: securecam
|
||||
TURN_CREDENTIAL: securecamturn
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
@@ -65,6 +91,8 @@ services:
|
||||
condition: service_healthy
|
||||
minio:
|
||||
condition: service_started
|
||||
coturn:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
|
||||
webapp:
|
||||
@@ -75,6 +103,10 @@ services:
|
||||
environment:
|
||||
BACKEND_URL: http://backend:3000
|
||||
VITE_BACKEND_URL: http://localhost:3000
|
||||
VITE_STUN_URLS: stun:stun.l.google.com:19302
|
||||
VITE_TURN_URLS: turn:localhost:3478?transport=udp,turn:localhost:3478?transport=tcp
|
||||
VITE_TURN_USERNAME: securecam
|
||||
VITE_TURN_CREDENTIAL: securecamturn
|
||||
ports:
|
||||
- "5173:5173"
|
||||
volumes:
|
||||
@@ -82,6 +114,7 @@ services:
|
||||
- webapp_node_modules:/app/node_modules
|
||||
depends_on:
|
||||
- backend
|
||||
- coturn
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user