45 lines
2.1 KiB
YAML
45 lines
2.1 KiB
YAML
# Janus WebRTC Gateway(WebRTC 音视频客服组件,关键字:janus 或组合关键字 webrtc)
|
||
# 启动方式:./start.sh webrtc ... 或 docker compose --env-file .env -f compose/compose-janus.yaml up -d(在 deploy/docker 目录执行)
|
||
# https://github.com/meetecho/janus-gateway
|
||
# [github](https://github.com/Bytedesk/bytedesk-janus)
|
||
# [janus docker镜像](https://hub.docker.com/r/bytedesk/janus)
|
||
# 仅启动 Janus,不启用 nginx;启动后可在浏览器访问端口(用于连通性),但直接 GET 通常会返回 404(正常):
|
||
# - http://localhost:18089
|
||
# - ws://localhost:18188/janus (WebSocket API,需通过客户端连接,非普通网页)
|
||
# Admin/Monitor HTTP API(管理后台 Janus 监控,需携带 admin_secret):
|
||
# - http://localhost:18091/admin (映射容器 7088)
|
||
# 正确检查方式(HTTP API 需 POST 到 /janus):
|
||
# curl -sS -X POST -H 'Content-Type: application/json' --data '{"janus":"ping","transaction":"check"}' http://localhost:18089/janus
|
||
# curl -sS -X POST -H 'Content-Type: application/json' --data '{"janus":"get_status","transaction":"check","admin_secret":"janusoverlord"}' http://localhost:18091/admin
|
||
services:
|
||
bytedesk-janus:
|
||
image: registry.cn-hangzhou.aliyuncs.com/bytedesk/janus:latest
|
||
container_name: janus-bytedesk
|
||
restart: always
|
||
ports:
|
||
- "18089:8088/tcp"
|
||
- "18090:8089/tcp"
|
||
- "18091:7088/tcp"
|
||
- "18188:8188/tcp"
|
||
- "17188:7188/tcp"
|
||
- "18178:3478/udp"
|
||
- "18179:3478/tcp"
|
||
- "11000-11200:10000-10200/udp"
|
||
command: ["/usr/local/bin/janus", "-F", "/usr/local/etc/janus"]
|
||
environment:
|
||
- TZ=Asia/Shanghai
|
||
volumes:
|
||
- ../../janus/etc/janus:/usr/local/etc/janus:ro
|
||
networks:
|
||
- bytedesk-network
|
||
healthcheck:
|
||
test: ["CMD-SHELL", "curl -sS -X POST -H 'Content-Type: application/json' --data '{\"janus\":\"ping\",\"transaction\":\"healthcheck\"}' http://127.0.0.1:8088/janus | grep -qi pong"]
|
||
interval: 30s
|
||
timeout: 10s
|
||
retries: 5
|
||
start_period: 20s
|
||
|
||
networks:
|
||
bytedesk-network:
|
||
driver: bridge
|