diff --git a/docker-compose-coturn.yml b/docker-compose-coturn.yml new file mode 100644 index 0000000..e9a05b4 --- /dev/null +++ b/docker-compose-coturn.yml @@ -0,0 +1,19 @@ +version: "3" +services: + node: + image: "node:lts-alpine" + user: "node" + working_dir: /home/node/app + volumes: + - ./:/home/node/app + command: ash -c "npm i && npm run start:prod" + restart: unless-stopped + ports: + - "3000:3000" + coturn_server: + image: "coturn/coturn" + restart: always + network_mode: "host" + volumes: + - ./turnserver.conf:/etc/coturn/turnserver.conf + #you need to copy turnserver_example.conf to turnserver.conf and specify domain, IP address, user and password diff --git a/turnserver_example.conf b/turnserver_example.conf new file mode 100644 index 0000000..09e7986 --- /dev/null +++ b/turnserver_example.conf @@ -0,0 +1,38 @@ +# TURN server name and realm +realm= +server-name=pairdrop + +# IPs the TURN server listens to +listening-ip=0.0.0.0 + +# External IP-Address of the TURN server +external-ip= + +# Main listening port +listening-port=3478 + +# Further ports that are open for communication +min-port=10000 +max-port=20000 + +# Use fingerprint in TURN message +fingerprint + +# Log file path +log-file=/var/log/turnserver.log + +# Enable verbose logging +verbose + +# Specify the user for the TURN authentification +user=user:password + +# Enable long-term credential mechanism +lt-cred-mech + +# SSL certificates +cert=/etc/letsencrypt/live//cert.pem +pkey=/etc/letsencrypt/live//privkey.pem + +# 443 for TURN over TLS, which can bypass firewalls +tls-listening-port=443