- Docker Compose 模板
version: '3.5'
services:
# transfer
coturn-transfer:
image: coturn/coturn:latest
restart: ${RESTART_POLICY:-unless-stopped}
command: -u ${ICE_USERNAME:TEST}:${ICE_PASSWORD:TEST} -r ${TRANSFER_DOMAIN:localhost} -X ${HOST_IP:127.0.0.1} -E ${HOST_IP:127.0.0.1} --listening-port 5678 -f -a -v --no-cli --no-tls --no-dtls --check-origin-consistency
ports:
- "5678:5678/tcp"
networks:
transfer:
transfer:
image: kern/filepizza:master
restart: ${RESTART_POLICY:-unless-stopped}
environment:
PORT: ${TRANSFER_PORT:80}
ICE_SERVERS: '[{"urls": "turn:${HOST_IP:127.0.0.1}:5678?transport=tcp","username": "${ICE_USERNAME:TEST}","credential": "${ICE_PASSWORD:TEST}"}]'
depends_on:
- coturn-transfer
networks:
transfer:
networks:
transfer:
- 环境变量配置:
TRANSFER_DOMAIN=transfer.test.com
TRANSFER_PORT=10080
ICE_USERNAME=TEST
ICE_PASSWORD=TEST