Giter VIP home page Giter VIP logo

Comments (10)

tyranron avatar tyranron commented on June 5, 2024 4

@weltmaister

the "-n" flag is necessary?

No it's not. It's added by default as Docker image has no config file inside. You're free to override container args to match your use case.

Or how can I solve this when needing "--external-ip=$(detect-external-ip)" for nonstatic IP via DynDNS?

You can mix config file and container args. For example:

services:
  coturn:
    container_name: myproj-coturn
    image: instrumentisto/coturn:4.5
    command:
      - --log-file=stdout
      - --external-ip=$$(detect-external-ip)  # <- notice $$ to omit Docker Compose expansion
      #- --Verbose
    volumes:
      - ./_dev/coturn/turnserver.conf:/etc/coturn/turnserver.conf:ro
      - ./.cache/coturn/data:/var/lib/coturn
    network_mode: host

from coturn-docker-image.

lurkker avatar lurkker commented on June 5, 2024 2

I had the same problem.

The Dockerfile in this repo has the following command line:

CMD ["-n", "--log-file=stdout", "--external-ip=$(detect-external-ip)"]

In the coturn wiki it says:

-n Do not use configuration file, use only command line parameters.

To override the Dockerfile's command in your docker-compose.yml just use:

coturn:
    image: instrumentisto/coturn
    command: turnserver

command: turnserver allows the turnserver to read the config in /etc/coturn/turnserver.conf but does not have the log-file and external-ip flags therefore you will also have to set these in your turnserver.conf:

log-file=stdout
external-ip=0.0.0.0

Replace 0.0.0.0 with your turn server's public ip address.

from coturn-docker-image.

weltmaister avatar weltmaister commented on June 5, 2024 1

@tyranron

services:
  coturn:
    image: instrumentisto/coturn:latest
    command:
      - -c=/etc/coturn/turnserver.conf
      - --log-file=stdout
      - --external-ip=$$(detect-external-ip)
    volumes:
      - ./_dev/coturn/turnserver.conf:/etc/coturn/turnserver.conf:ro
    network_mode: host

with '- -c=/etc/coturn/turnserver.conf'
and '$$' works for me.

... - --external-ip=$(detect-external-ip) ...

with '$' didn´t.
Thanks a lot.

PS: Should be there a hint in the README.md, that a volume-linked turnserver.conf always has to be in conjunction with the "- -c=" command option?

from coturn-docker-image.

tyranron avatar tyranron commented on June 5, 2024

@bd8392 we've never used NextCloud talk plugin, so barely we can help you with that.

However, you can provide here your Docker Compose specs you've done already and we can help you to find out what is wrong.

from coturn-docker-image.

bf8392 avatar bf8392 commented on June 5, 2024

There is an Issue with specifying the config file...
Mounting own config under /etc/coturn/turnserver.conf does not work...It only works with the command option specifying the location of the config file, but when the turnserver restarts, the command is ignored. Also ther is no way provided to specify the commands directly in docker compose...That was the problem why it was not working with nextcloud...here my working docker-compose (till the service restarts)

coturn:
container_name: coturn
image: instrumentisto/coturn
restart: unless-stopped
depends_on:
- nextcloud
network_mode: host
volumes:
- /your/cool/configlocation:/my
command:
-c /my/turnserver.conf

from coturn-docker-image.

tyranron avatar tyranron commented on June 5, 2024

@bd8392

Mounting own config under /etc/coturn/turnserver.conf does not work

Why? It works for us pretty well.

from coturn-docker-image.

bf8392 avatar bf8392 commented on June 5, 2024

I don't know... tried it multiple times...

from coturn-docker-image.

bf8392 avatar bf8392 commented on June 5, 2024

Could you find the reason why it's maybe not working for me?

from coturn-docker-image.

weltmaister avatar weltmaister commented on June 5, 2024

Hi,
in

CMD ["-n", "--log-file=stdout", "--external-ip=$(detect-external-ip)"]

the "-n" flag is necessary?
AFAIU, with it, an individual turnserver.conf could never work or how does it?
Or how can I solve this when needing "--external-ip=$(detect-external-ip)" for nonstatic IP via DynDNS?
Tried already the Dockerfile with setting everything as command line parameters:

CMD ["-n", "--log-file=stdout", "--external-ip=$(detect-external-ip)", "--listening-port=3478", "--lt-cred-mech", "--use-auth-secret", "static-auth-secret=xxxxxxxx", "--realm=xxx.xxxx.xx", "--total-quota=100", "--bps-capacity=0", "--stale-nonce", "--no-loopback-peers", "--no-multicast-peers"]

didn´t work neither as

CMD ["-c=/etc/coturn/turnserver.conf", "--log-file=stdout", "--external-ip=$(detect-external-ip)"]

both produce same result in log:

standard_init_linux.go:211: exec user process caused "no such file or directory"

sorry for reopening

from coturn-docker-image.

SuperSandro2000 avatar SuperSandro2000 commented on June 5, 2024

notice $$ to omit Docker Compose expansion

which is wrong. It still gets expanded to one $.

from coturn-docker-image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.