diff --git a/docker-compose.yaml b/docker-compose.yaml index 1d33f0d..5fb3c53 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -186,7 +186,7 @@ services: - app-network coturn: - image: coturn/coturn:4.6.3 + image: coturn/coturn:4.8.0 container_name: coturn restart: unless-stopped profiles: ["remote"] @@ -196,25 +196,11 @@ services: - "5349:5349/udp" - "5349:5349/tcp" - "49152-49200:49152-49200/udp" - environment: - TURN_SECRET: ${TURN_SECRET} - TURN_HOST: ${TURN_HOST} - command: > - -n - --listening-port=3478 - --tls-listening-port=5349 - --min-port=49152 - --max-port=49200 - --realm=${TURN_REALM:-dograh.com} - --use-auth-secret - --static-auth-secret=${TURN_SECRET} - --fingerprint - --no-cli - --log-file=stdout - --no-multicast-peers - --no-tlsv1 - --no-tlsv1_1 - ${TURN_HOST:+--external-ip=$TURN_HOST} + volumes: + - ./turnserver.conf:/etc/coturn/turnserver.conf:ro + command: + - -c + - /etc/coturn/turnserver.conf networks: - app-network diff --git a/pipecat b/pipecat index 3eb7013..f999b70 160000 --- a/pipecat +++ b/pipecat @@ -1 +1 @@ -Subproject commit 3eb70131d4c96e5baf7129fb657efe003893ccc9 +Subproject commit f999b70ffb3ba678aec1996f85a69fe13692d067 diff --git a/scripts/setup_remote.sh b/scripts/setup_remote.sh index 17eab2a..d1e71c5 100755 --- a/scripts/setup_remote.sh +++ b/scripts/setup_remote.sh @@ -133,7 +133,40 @@ echo -e "${BLUE}[4/5] Generating SSL certificates...${NC}" ./generate_certificate.sh echo -e "${GREEN}✓ SSL certificates generated${NC}" -echo -e "${BLUE}[5/5] Creating environment file...${NC}" +echo -e "${BLUE}[5/6] Creating TURN server configuration...${NC}" +cat > turnserver.conf << TURN_EOF +# Coturn TURN Server - Docker Configuration +# Auto-generated by setup_remote.sh + +# Listener ports +listening-port=3478 +tls-listening-port=5349 + +# Relay port range +min-port=49152 +max-port=49200 + +# Network - external IP for NAT traversal +external-ip=$SERVER_IP + +# Realm +realm=dograh.com + +# Authentication (TURN REST API with time-limited credentials) +use-auth-secret +static-auth-secret=$TURN_SECRET + +# Security +fingerprint +no-cli +no-multicast-peers + +# Logging +log-file=stdout +TURN_EOF +echo -e "${GREEN}✓ turnserver.conf created${NC}" + +echo -e "${BLUE}[6/6] Creating environment file...${NC}" cat > .env << ENV_EOF # Backend API endpoint (for remote deployment) BACKEND_API_ENDPOINT=https://$SERVER_IP @@ -155,6 +188,7 @@ echo "" echo -e "Files created in ${BLUE}$(pwd)${NC}:" echo " - docker-compose.yaml" echo " - nginx.conf" +echo " - turnserver.conf" echo " - generate_certificate.sh" echo " - certs/local.crt" echo " - certs/local.key"