mirror of
https://github.com/Dokploy/templates.git
synced 2026-04-28 19:18:31 -05:00
feat: add Livekit Blueprint (#197)
Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
This commit is contained in:
58
blueprints/livekit/docker-compose.yml
Normal file
58
blueprints/livekit/docker-compose.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
services:
|
||||
livekit:
|
||||
image: livekit/livekit-server:v1.9.0
|
||||
restart: unless-stopped
|
||||
command: --config /etc/livekit.yaml
|
||||
volumes:
|
||||
- ../files/livekit.yaml:/etc/livekit.yaml
|
||||
ports:
|
||||
- "${LIVEKIT_PORT}:${LIVEKIT_PORT}"
|
||||
- "${TURN_UDP_PORT}:${TURN_UDP_PORT}/udp"
|
||||
- "${LIVEKIT_UDP_PORT}:${LIVEKIT_UDP_PORT}/udp"
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "wget -qO- http://localhost:${LIVEKIT_PORT} || exit 1" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
restart: unless-stopped
|
||||
command: redis-server /etc/redis.conf
|
||||
volumes:
|
||||
- ../files/redis.conf:/etc/redis.conf
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "redis-cli ping || exit 1" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
|
||||
egress:
|
||||
image: livekit/egress:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- EGRESS_CONFIG_FILE=/etc/egress.yaml
|
||||
volumes:
|
||||
- ../files/egress.yaml:/etc/egress.yaml
|
||||
cap_add:
|
||||
- CAP_SYS_ADMIN
|
||||
depends_on:
|
||||
livekit:
|
||||
condition: service_healthy
|
||||
|
||||
ingress:
|
||||
image: livekit/ingress:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- INGRESS_CONFIG_FILE=/etc/ingress.yaml
|
||||
volumes:
|
||||
- ../files/ingress.yaml:/etc/ingress.yaml
|
||||
ports:
|
||||
- "${RTMP_PORT}:${RTMP_PORT}"
|
||||
- "${INGRESS_UDP_PORT}:${INGRESS_UDP_PORT}/udp"
|
||||
depends_on:
|
||||
livekit:
|
||||
condition: service_healthy
|
||||
10
blueprints/livekit/livekit.svg
Normal file
10
blueprints/livekit/livekit.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200px" height="200px" viewBox="0 0 200 200" version="1.1">
|
||||
<g id="surface1">
|
||||
<rect x="0" y="0" width="200" height="200" style="fill:rgb(2.745098%,2.745098%,2.745098%);fill-opacity:1;stroke:none;"/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(2.745098%,2.745098%,2.745098%);fill-opacity:1;" d="M 22.324219 22.324219 L 178.605469 22.324219 L 178.605469 178.605469 L 22.324219 178.605469 Z M 22.324219 22.324219 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(12.156863%,83.529413%,97.647059%);fill-opacity:1;" d="M 111.628906 89.300781 L 89.300781 89.300781 L 89.300781 111.628906 L 111.628906 111.628906 Z M 133.957031 66.976562 L 111.632812 66.976562 L 111.632812 89.3125 L 133.957031 89.3125 Z M 133.957031 111.628906 L 111.632812 111.628906 L 111.632812 133.957031 L 133.957031 133.957031 Z M 156.277344 44.652344 L 133.953125 44.652344 L 133.953125 66.976562 L 156.277344 66.976562 Z M 156.277344 44.652344 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(12.156863%,83.529413%,97.647059%);fill-opacity:1;" d="M 156.277344 133.953125 L 133.953125 133.953125 L 133.953125 156.277344 L 156.277344 156.277344 Z M 156.277344 133.953125 "/>
|
||||
<path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 66.976562 133.953125 L 66.976562 44.652344 L 44.652344 44.652344 L 44.652344 156.277344 L 111.628906 156.277344 L 111.628906 133.953125 L 66.976562 133.953125 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
150
blueprints/livekit/template.toml
Normal file
150
blueprints/livekit/template.toml
Normal file
@@ -0,0 +1,150 @@
|
||||
[variables]
|
||||
main_domain = "livekit.${domain}"
|
||||
turn_domain = "livekit-turn.${domain}"
|
||||
whip_domain = "livekit-whip.${domain}"
|
||||
api_key = "API${password:12}"
|
||||
api_secret = "${password:44}"
|
||||
redis_address = "redis:6379"
|
||||
redis_password = "${password:32}"
|
||||
|
||||
livekit_port = "7880"
|
||||
livekit_tcp_port = "7881"
|
||||
livekit_udp_port = "7882"
|
||||
turn_tls_port = "5349"
|
||||
turn_udp_port = "3478"
|
||||
rtmp_port = "1935"
|
||||
whip_port = "8080"
|
||||
ingress_udp_port = "7885"
|
||||
http_relay_port = "9090"
|
||||
|
||||
[config]
|
||||
[[config.domains]]
|
||||
serviceName = "livekit"
|
||||
port = 7880
|
||||
host = "${main_domain}"
|
||||
|
||||
[[config.domains]]
|
||||
serviceName = "livekit"
|
||||
port = 5349
|
||||
host = "${turn_domain}"
|
||||
|
||||
[[config.domains]]
|
||||
serviceName = "ingress"
|
||||
port = 8080
|
||||
host = "${whip_domain}"
|
||||
|
||||
[config.env]
|
||||
LIVEKIT_URL = "${main_domain}"
|
||||
RTMP_URL = "${turn_domain}"
|
||||
WHIP_URL = "${whip_domain}"
|
||||
REDIS_ADDRESS = "${redis_address}"
|
||||
REDIS_PASSWORD = "${redis_password}"
|
||||
API_KEY = "${api_key}"
|
||||
API_SECRET = "${api_secret}"
|
||||
LIVEKIT_PORT = "${livekit_port}"
|
||||
LIVEKIT_TCP_PORT = "${livekit_tcp_port}"
|
||||
LIVEKIT_UDP_PORT = "${livekit_udp_port}"
|
||||
TURN_TLS_PORT = "${turn_tls_port}"
|
||||
TURN_UDP_PORT = "${turn_udp_port}"
|
||||
RTMP_PORT = "${rtmp_port}"
|
||||
WHIP_PORT = "${whip_port}"
|
||||
INGRESS_UDP_PORT = "${ingress_udp_port}"
|
||||
HTTP_RELAY_PORT = "${http_relay_port}"
|
||||
|
||||
[[config.mounts]]
|
||||
filePath = "redis.conf"
|
||||
content = """
|
||||
bind 0.0.0.0
|
||||
protected-mode yes
|
||||
port 6379
|
||||
timeout 0
|
||||
tcp-keepalive 300
|
||||
requirepass ${redis_password}
|
||||
"""
|
||||
|
||||
[[config.mounts]]
|
||||
filePath = "livekit.yaml"
|
||||
content = """
|
||||
port: ${livekit_port}
|
||||
bind_addresses:
|
||||
- ""
|
||||
rtc:
|
||||
tcp_port: ${livekit_tcp_port}
|
||||
udp_port: ${livekit_udp_port}
|
||||
use_external_ip: true
|
||||
enable_loopback_candidate: false
|
||||
redis:
|
||||
address: ${redis_address}
|
||||
username: ""
|
||||
password: ${redis_password}
|
||||
db: 0
|
||||
use_tls: false
|
||||
sentinel_master_name: ""
|
||||
sentinel_username: ""
|
||||
sentinel_password: ""
|
||||
sentinel_addresses: []
|
||||
cluster_addresses: []
|
||||
max_redirects: null
|
||||
turn:
|
||||
enabled: true
|
||||
domain: ${turn_domain}
|
||||
tls_port: ${turn_tls_port}
|
||||
udp_port: ${turn_udp_port}
|
||||
external_tls: true
|
||||
ingress:
|
||||
rtmp_base_url: rtmp://${main_domain}:${rtmp_port}/x
|
||||
whip_base_url: https://${whip_domain}/w
|
||||
keys:
|
||||
${api_key}: ${api_secret}
|
||||
"""
|
||||
|
||||
[[config.mounts]]
|
||||
filePath = "egress.yaml"
|
||||
content = """
|
||||
redis:
|
||||
address: ${redis_address}
|
||||
username: ""
|
||||
password: ${redis_password}
|
||||
db: 0
|
||||
use_tls: false
|
||||
sentinel_master_name: ""
|
||||
sentinel_username: ""
|
||||
sentinel_password: ""
|
||||
sentinel_addresses: []
|
||||
cluster_addresses: []
|
||||
max_redirects: null
|
||||
api_key: ${api_key}
|
||||
api_secret: ${api_secret}
|
||||
ws_url: wss://${main_domain}
|
||||
"""
|
||||
|
||||
[[config.mounts]]
|
||||
filePath = "ingress.yaml"
|
||||
content = """
|
||||
redis:
|
||||
address: ${redis_address}
|
||||
username: ""
|
||||
password: ${redis_password}
|
||||
db: 0
|
||||
use_tls: false
|
||||
sentinel_master_name: ""
|
||||
sentinel_username: ""
|
||||
sentinel_password: ""
|
||||
sentinel_addresses: []
|
||||
cluster_addresses: []
|
||||
max_redirects: null
|
||||
api_key: ${api_key}
|
||||
api_secret: ${api_secret}
|
||||
ws_url: wss://${main_domain}
|
||||
rtmp_port: ${rtmp_port}
|
||||
whip_port: ${whip_port}
|
||||
http_relay_port: ${http_relay_port}
|
||||
logging:
|
||||
json: false
|
||||
level: ""
|
||||
development: false
|
||||
rtc_config:
|
||||
udp_port: ${ingress_udp_port}
|
||||
use_external_ip: true
|
||||
enable_loopback_candidate: false
|
||||
"""
|
||||
19
meta.json
19
meta.json
@@ -3422,6 +3422,25 @@
|
||||
"rabbitmq"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "livekit",
|
||||
"name": "Livekit",
|
||||
"version": "v1.9.0",
|
||||
"description": "LiveKit is an open source platform for developers building realtime media applications.",
|
||||
"logo": "livekit.svg",
|
||||
"links": {
|
||||
"github": "https://github.com/livekit/livekit",
|
||||
"website": "https://livekit.io/",
|
||||
"docs": "https://docs.livekit.io/"
|
||||
},
|
||||
"tags": [
|
||||
"Video",
|
||||
"Audio",
|
||||
"Real-time",
|
||||
"Streaming",
|
||||
"Webrtc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ezbookkeeping",
|
||||
"name": "EZBookkeeping",
|
||||
|
||||
Reference in New Issue
Block a user