version: "3"

services:

  coturn:
    image: coturn/coturn:4.6.1
    restart: always
    command:
      - turnserver
      - --log-file=stdout
      - --external-ip=$$(detect-external-ip)
      - --listening-port=3478
      - --min-port=10000
      - --max-port=10010
      - --tls-listening-port=5349
      - --listening-ip=0.0.0.0
      - --realm={{domain}}
      - --server-name={{domain}}
      - --lt-cred-mech
      - --user={{coturn_username}}:{{coturn_password}}
    network_mode: host
