Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Docker-compose with nodejs #824

Closed
PodaruDragos opened this issue Sep 19, 2021 · 3 comments
Closed

Question: Docker-compose with nodejs #824

PodaruDragos opened this issue Sep 19, 2021 · 3 comments
Labels

Comments

@PodaruDragos
Copy link

Is there any example that uses docker-compose with nodejs ?
If someone can provide a basic guidance or example it will be much appreciated.

@tyranron
Copy link
Collaborator

@PodaruDragos what do you by "example that uses docker-compose with nodejs"? How exactly you're supposed to use Coturn with NodeJS app? Most of the time they're used fully decoupled, so you shouldn't bother whether there is a NodeJS app or something else.

@PodaruDragos
Copy link
Author

@tyranron sorry for maybe misplacing the question. What I am asking is if there is an example to actually run coturn in a docker-compose file and how to proper configure it to actually work. I omitted the node part from docker-compose since my question was not properly asked.

version: '3.8'

services: 
  coturn:
    container_name: coturn
    image: coturn/coturn:latest
    network_mode: host
    ports:
      - '5349:5349'
      - '5349:5349/udp'
      - '5350:5350'
      - '5350:5350/udp'
      - '443:443'
      - '443:443/udp'
    restart: always
  
  database:
    container_name: database
    env_file: .env
    image: postgres:latest
    ports:
      - '5432:5432'
    restart: unless-stopped
    volumes:
      - database-data:/var/lib/postgresql/data

volumes:
  database-data: {}
coturn    | 0: : WARNING: Cannot find config file: turnserver.conf. Default and command-line settings will be used.
coturn    | 0: : WARNING: Cannot find config file: turnserver.conf. Default and command-line settings will be used.
coturn    | 0: : WARNING: Cannot find config file: turnserver.conf. Default and command-line settings will be used.
coturn    | 0: : WARNING: Cannot find config file: turnserver.conf. Default and command-line settings will be used.
coturn    | 0: : WARNING: Cannot find config file: turnserver.conf. Default and command-line settings will be used.
coturn    | 0: : WARNING: Cannot find config file: turnserver.conf. Default and command-line settings will be used.

How can I configure turnserver.conf ?
Is there any way I can specify the things needed from an .env file? and if so can you point into a direction since I din't find anything in the docs.

If the question is not good enough or if the docs mentions something like this, fell free to close this question. Thanks.

@misi
Copy link
Contributor

misi commented Sep 22, 2021

The volume section is missing from your docker-compose see

volumes:
- ./coturn/turnserver.conf:/etc/turnserver.conf:ro
- ./coturn/privkey.pem:/etc/ssl/private/privkey.pem:ro
- ./coturn/cert.pem:/etc/ssl/certs/cert.pem:ro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants