services: app: environment: - TURN_SERVER=${DOMAIN} - TURN_PORT=3478 secrets: - coturn_shared_secret coturn: image: instrumentisto/coturn:latest networks: - swarm_host secrets: - coturn_shared_secret configs: - source: turnserver_conf target: /etc/coturn/turnserver.conf configs: turnserver_conf: name: ${STACK_NAME}_turnserver_conf_${TURNSERVER_CONF_VERSION} file: turnserver.conf.tmpl template_driver: golang secrets: coturn_shared_secret: external: true name: ${STACK_NAME}_coturn_shared_secret_${COTURN_SHARED_SECRET_VERSION} networks: # use host-mode networking until Docker can handle mass port-forwards: # https://github.com/moby/moby/issues/11185 swarm_host: external: name: 'host'