Comments (6)
@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.
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.
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.
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.
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.
Thank you very much for your assistance!
from coturn-docker-image.
Related Issues (20)
- Dockerfile states configuration file is not taken into account by default HOT 1
- Starting docker halts HOT 5
- Turnadmin usage HOT 1
- Does this image support exclusive turn/turns over 80/443 ? HOT 3
- Run in Azure docker HOT 1
- Feature - Support others architectures HOT 7
- Merging of Docker image into official repo? HOT 3
- Deploy to kubernets HOT 2
- letsencrypt certbot HOT 1
- SQLite connection closed HOT 2
- What is the username and password for accessing the turn server HOT 2
- Where can I set the username and password for the Turn service? HOT 2
- turn server username password HOT 1
- TURN server issue HOT 2
- Image for RPI4 HOT 1
- Update to 4.5.2 HOT 2
- Service 'coturn' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder360299840/rootfs: no such file or directory HOT 3
- Prometheus? HOT 4
- Running turnserver as non-root using privileged ports HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coturn-docker-image.