kopia lustrzana https://codeberg.org/nmkj/audon
add egress and peertube config
rodzic
fec8e75a74
commit
b9b1c8b8fe
|
@ -43,12 +43,24 @@ services:
|
|||
image: livekit/livekit-server:v1.3
|
||||
command: --config /etc/livekit.yaml
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
ports:
|
||||
- "7881:7881"
|
||||
- "7882:7882/udp"
|
||||
volumes:
|
||||
- ./livekit.yaml:/etc/livekit.yaml:ro
|
||||
|
||||
egress:
|
||||
image: livekit/egress:v1.5
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- redis
|
||||
environment:
|
||||
- EGRESS_CONFIG_FILE=/etc/egress.yaml
|
||||
volumes:
|
||||
- ./egress.yaml:/etc/egress.yaml:ro
|
||||
|
||||
caddy:
|
||||
image: caddy:2
|
||||
restart: unless-stopped
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# required fields
|
||||
api_key: devkey
|
||||
api_secret: secret
|
||||
ws_url: ws://livekit:7880
|
||||
redis:
|
||||
address: redis:6379
|
||||
db: 1
|
||||
|
||||
# optional fields
|
||||
template_base: https://audon.localhost/egress
|
||||
insecure: true
|
|
@ -18,6 +18,10 @@ webhook:
|
|||
urls:
|
||||
- http://devcontainer:8100/app/webhook
|
||||
|
||||
redis:
|
||||
address: redis:6379
|
||||
db: 1
|
||||
|
||||
room:
|
||||
auto_create: false
|
||||
empty_timeout: 30
|
||||
|
|
|
@ -37,3 +37,9 @@ BOT_SERVER=
|
|||
BOT_CLIENT_ID=
|
||||
BOT_CLIENT_SECRET=
|
||||
BOT_ACCESS_TOKEN=
|
||||
|
||||
### Archive Settings ###
|
||||
# Leave the following fields empty to disable archiving.
|
||||
PEERTUBE_SERVER=
|
||||
PEERTUBE_USER=
|
||||
PEERTUBE_PASSWORD=
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "peertube"]
|
||||
path = peertube
|
||||
url = https://framagit.org/framasoft/peertube/clients/go.git
|
|
@ -0,0 +1 @@
|
|||
package main
|
27
config.go
27
config.go
|
@ -16,6 +16,7 @@ type (
|
|||
AppConfig struct {
|
||||
AppConfigBase
|
||||
Livekit *LivekitConfig
|
||||
PeerTube *PeerTubeConfig
|
||||
MongoURL *url.URL
|
||||
Database *DBConfig
|
||||
Redis *RedisConfig
|
||||
|
@ -31,6 +32,16 @@ type (
|
|||
LogoImageFront image.Image
|
||||
}
|
||||
|
||||
PeerTubeConfig struct {
|
||||
Enable bool
|
||||
Server *url.URL
|
||||
User string
|
||||
Password string
|
||||
ClientID string
|
||||
ClientSecret string
|
||||
AccessToken string
|
||||
}
|
||||
|
||||
LivekitConfig struct {
|
||||
APIKey string `validate:"required,ascii"`
|
||||
APISecret string `validate:"required,ascii"`
|
||||
|
@ -205,5 +216,21 @@ func loadConfig(envname string) (*AppConfig, error) {
|
|||
}
|
||||
appConf.Bot = botConf
|
||||
|
||||
// Setup PeerTube config
|
||||
ptHost := os.Getenv("PEERTUBE_SERVER")
|
||||
ptConf := &PeerTubeConfig{
|
||||
Enable: ptHost != "",
|
||||
User: os.Getenv("PEERTUBE_USER"),
|
||||
Password: os.Getenv("PEERTUBE_PASSWORD"),
|
||||
}
|
||||
if ptConf.Enable {
|
||||
ptConf.Server = &url.URL{
|
||||
Host: ptHost,
|
||||
Scheme: "https",
|
||||
Path: "/",
|
||||
}
|
||||
}
|
||||
appConf.PeerTube = ptConf
|
||||
|
||||
return &appConf, nil
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
# required fields
|
||||
api_key: devkey
|
||||
api_secret: secret
|
||||
ws_url: wss://livekit.example.com:7880
|
||||
redis:
|
||||
address: 127.0.0.1:6379
|
||||
db: 1
|
||||
|
||||
# optional fields
|
||||
template_base: https://example.com/egress
|
||||
insecure: false
|
|
@ -0,0 +1 @@
|
|||
Subproject commit f53e8075f7f9ec8a26ce09747f95e9a725f5b19f
|
Ładowanie…
Reference in New Issue