Giter Club home page Giter Club logo

Comments (6)

tyranron avatar tyranron commented on May 27, 2024

@sskender would you be so kind to explain more detailed what do you mean?

If you want to configure Coturn via env vars, I think there isn't much we can do. The docker image itself is just a thin wrapper around upstream software. So:

  • if Coturn itself doesn't support config via env vars, neither we can;
  • if Coturn supports it - just use it.

And, of course, we always can do some custom magic via docker-entrypoint.sh. But I don't see much sense in it, since Coturn is pretty well configured via CLI args already. And environments such as Docker Compose and Kubernetes allow to map its env vars to CLI args pretty well. So, in practice, we don't feel any friction with it.

from coturn-docker-image.

sskender avatar sskender commented on May 27, 2024

For larger deployments via docker-compose file it is very convenient for me to use env variables which can be loaded from .env file rather than passing cli args (such as realm).

As far as I know, coturn does not support env variables, only cli args and config file. Correct me if I am wrong on that one. That is not a problem as I run this docker image anyway.

So, what I ended up doing was changing docker-entrypoint.sh to read passed env varibles and stick them as cli args.

In a nutshell, my question is, do you think this is a good way to do it? Do you have any other suggestions? Would you like me to polish my solution and create a pull request?

from coturn-docker-image.

tyranron avatar tyranron commented on May 27, 2024

@sskender

In a nutshell, my question is, do you think this is a good way to do it?

If it solves you problem and removes friction - yes.

Do you have any other suggestions?

As I've mentioned, for us the following mapping with .env files is quite enough:

services:
  coturn:
    container_name: ${COMPOSE_PROJECT_NAME}-coturn
    image: instrumentisto/coturn:4.5
    depends_on: ["coturn-db"]
    command:
      - --log-file=${COTURN_LOG_FILE}
      # ...etc

But I realize that for someone it may be not enough.

Would you like me to polish my solution and create a pull request?

Yes, of course! Somebody else may gain from it! ❤️

from coturn-docker-image.

sskender avatar sskender commented on May 27, 2024

Hm, I can't say I have seen this kind of mapping before. Are those variables, such as ${COMPOSE_PROJECT_NAME}, defined in host system or in coturn service in this case? You haven't defined any .env file or environment variables in compose file.

Because what I had in mind, was passing .env file to docker container and read them inside, not using any variables from my host system.

I will definitely create a PR when I will have more time on my hands.

from coturn-docker-image.

tyranron avatar tyranron commented on May 27, 2024

@sskender

Are those variables, such as ${COMPOSE_PROJECT_NAME}, defined in host system or in coturn service in this case? You haven't defined any .env file or environment variables in compose file.

They are defined in .env file along with docker-compose.yml and also can be easily overwritten if required like this:

COMPOSE_PROJECT_NAME=my docker-compose up

I will definitely create a PR when I will have more time on my hands.

👌

from coturn-docker-image.

sskender avatar sskender commented on May 27, 2024

Thank you very much for your assistance!

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.