Merge pull request #27 from outis1one/claude/asterisk-vpn-mobile-issue-Nt958
Claude/asterisk vpn mobile issue nt958
This commit is contained in:
+22
-18
@@ -82,29 +82,33 @@ services:
|
|||||||
image: coturn/coturn:latest
|
image: coturn/coturn:latest
|
||||||
container_name: easy-asterisk-coturn
|
container_name: easy-asterisk-coturn
|
||||||
network_mode: host
|
network_mode: host
|
||||||
entrypoint: ["/bin/sh", "-c"]
|
# The coturn image runs as nobody:nogroup by default, which cannot
|
||||||
|
# create /var/run/turnserver.pid. Run as root to avoid this.
|
||||||
|
user: root
|
||||||
|
environment:
|
||||||
|
# Image-native external IP detection (adds --external-ip automatically)
|
||||||
|
- DETECT_EXTERNAL_IP=${DETECT_EXTERNAL_IP:-yes}
|
||||||
command:
|
command:
|
||||||
- |
|
- -n
|
||||||
# Build coturn arguments
|
- --listening-port=3478
|
||||||
ARGS="-n --listening-port=3478 --fingerprint --lt-cred-mech"
|
- --fingerprint
|
||||||
ARGS="$$ARGS --user=${TURN_USERNAME:-easyasterisk}:${TURN_PASSWORD:-changeme}"
|
- --lt-cred-mech
|
||||||
ARGS="$$ARGS --realm=${DOMAIN_NAME:-localhost}"
|
- --user=${TURN_USERNAME:-easyasterisk}:${TURN_PASSWORD:-changeme}
|
||||||
ARGS="$$ARGS --min-port=${TURN_RELAY_MIN:-49152}"
|
- --realm=${DOMAIN_NAME:-localhost}
|
||||||
ARGS="$$ARGS --max-port=${TURN_RELAY_MAX:-49252}"
|
- --min-port=${TURN_RELAY_MIN:-49152}
|
||||||
# Only add external-ip if PUBLIC_IP is set
|
- --max-port=${TURN_RELAY_MAX:-49252}
|
||||||
if [ -n "${PUBLIC_IP:-}" ]; then
|
- --no-tls
|
||||||
ARGS="$$ARGS --external-ip=${PUBLIC_IP}"
|
- --no-dtls
|
||||||
fi
|
- --no-cli
|
||||||
ARGS="$$ARGS --no-tls --no-dtls --no-cli"
|
- --no-multicast-peers
|
||||||
ARGS="$$ARGS --no-multicast-peers --no-loopback-peers"
|
- --log-file=stdout
|
||||||
ARGS="$$ARGS --log-file=stdout"
|
|
||||||
exec turnserver $$ARGS
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "ss -uln | grep -q ':3478'"]
|
test: ["CMD-SHELL", "turnutils_stunclient 127.0.0.1 >/dev/null 2>&1"]
|
||||||
interval: 30s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
asterisk-config:
|
asterisk-config:
|
||||||
|
|||||||
Reference in New Issue
Block a user