@@ -7,13 +7,13 @@ services:
77 condition : none
88 volumes :
99 # tmp DATA_ROOT from .env usage until image isn't built
10- - ${DATA_ROOT:-.}/deploy/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
10+ - ${DATA_ROOT:-../.. }/deploy/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
1111 # templates to render environment variables
1212 # https://github.com/docker-library/docs/tree/master/nginx#using-environment-variables-in-nginx-configuration-new-in-119
13- - ${DATA_ROOT:-.}/deploy/nginx/templates:/etc/nginx/templates:ro
14- - ${DATA_ROOT:-.}/pages:/usr/share/nginx/html:ro
15- - ${DATA_ROOT:-.}/certbot/www:/var/www/certbot:ro
16- - ${DATA_ROOT:-.}/certbot/conf:/etc/letsencrypt:ro
13+ - ${DATA_ROOT:-../.. }/deploy/nginx/templates:/etc/nginx/templates:ro
14+ - ${DATA_ROOT:-../.. }/pages:/usr/share/nginx/html:ro
15+ - ${DATA_ROOT:-../.. }/certbot/www:/var/www/certbot:ro
16+ - ${DATA_ROOT:-../.. }/certbot/conf:/etc/letsencrypt:ro
1717 environment :
1818 - SERVER_NAME=${SERVER_NAME:-localhost}
1919 ports :
@@ -29,8 +29,6 @@ services:
2929 published : 443
3030 target : 443
3131
32- # TODO: user/pass setup for remote deployment
33- # TODO: --allowed-peer-ip for TURN in internal network only
3432 # Workaround to deploy multiple WebRTC servers in docker swarm infrastructure.
3533 # Host mode cannot be used for several servers on minimum number of swarm nodes.
3634 #
@@ -44,9 +42,10 @@ services:
4442 # (different load-balancer service types are available for the same server)
4543 coturn :
4644 image : coturn/coturn:latest
47- # -n is not used "Do not use configuration file, take all parameters from the command line only."
48- # as gives "CONFIGURATION ALERT: Unknown argument: "
45+ # -n "Do not use configuration file, take all parameters from the command line only."
46+ # not used as it gives "CONFIGURATION ALERT: Unknown argument: "
4947 # TODO: use config file instead
48+ #
5049 # --listening-port=3478 mentions default value just to recall its value
5150 # --relay-threads=1 to make less socket bindings in develop environments
5251 # --no-cli to get rid of "CONFIG ERROR: Empty cli-password, and so telnet cli interface is disabled! Please set a non empty cli-password!"
@@ -61,7 +60,19 @@ services:
6160 # TODO: research is --fingerprint required increasing traffic
6261 #
6362 # TODO: enable/setup DTLS support (rm --no-dtls) for clients allowing "stuns:*" url
63+ #
64+ # TODO: remote --allowed-peer-ip for TURN in internal network only (additionally with auth)
65+ # Local docker compose tested:
66+ # --listening-ip=10.211.55.4
67+ # --relay-ip=10.211.55.4
68+ # --denied-peer-ip="0.0.0.0-255.255.255.255"
69+ # --allowed-peer-ip="172.17.0.0-172.17.255.255"
70+ # rt -stun stun:host.docker.internal:3478
71+ # rt -stun turn:10.211.55.4
72+ # turnutils_uclient 10.211.55.4 -DgX -u user -w pass -n 1 -c -y
73+ # turnutils_uclient 172.17.0.1 -DgX -u user -w pass -n 1 -c -e 172.21.0.2
6474 command : >
75+ -n
6576 --listening-port=3478
6677 --relay-threads=1
6778 --no-cli
@@ -70,9 +81,9 @@ services:
7081 --no-dtls
7182 --no-tcp-relay
7283 --no-multicast-peers
84+ --user=${TURN_USERNAME:-user}:${TURN_PASSWORD:-pass}
85+ --realm=default
7386 --lt-cred-mech
74- --user user:pass
75- --realm default
7687 --fingerprint
7788 --log-file=stdout
7889 --verbose
@@ -83,5 +94,11 @@ services:
8394 environment :
8495 - SERVER_NAME=${SERVER_NAME:-localhost}
8596 volumes :
86- - ${DATA_ROOT:-.}/certbot/www:/var/www/certbot:rw
87- - ${DATA_ROOT:-.}/certbot/conf:/etc/letsencrypt:rw
97+ - ${DATA_ROOT:-../..}/certbot/www:/var/www/certbot:rw
98+ - ${DATA_ROOT:-../..}/certbot/conf:/etc/letsencrypt:rw
99+
100+ locator :
101+ image : ${LOCATOR_IMAGE:-locator}
102+ volumes :
103+ - /var/run/docker.sock:/var/run/docker.sock
104+ # WebAPI TCP port 8080 is internal as NGINX is used to access
0 commit comments