mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Move ice-servers.json under dataDir.
This makes it easier to deploy by putting all user-serviceable files under data/.
This commit is contained in:
parent
4e594465cc
commit
8a4d315c51
4 changed files with 10 additions and 3 deletions
2
README
2
README
|
@ -15,7 +15,7 @@ Set the server administrator's username and password (optional):
|
||||||
|
|
||||||
Configure the list of STUN and TURN servers (optional):
|
Configure the list of STUN and TURN servers (optional):
|
||||||
|
|
||||||
vi static/ice-servers.json
|
vi data/ice-servers.json
|
||||||
|
|
||||||
Set up a group
|
Set up a group
|
||||||
|
|
||||||
|
|
2
sfu.go
2
sfu.go
|
@ -81,7 +81,7 @@ func main() {
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
iceFilename = filepath.Join(staticRoot, "ice-servers.json")
|
iceFilename = filepath.Join(dataDir, "ice-servers.json")
|
||||||
|
|
||||||
go readPublicGroups()
|
go readPublicGroups()
|
||||||
webserver()
|
webserver()
|
||||||
|
|
|
@ -24,7 +24,8 @@ func webserver() {
|
||||||
http.HandleFunc("/group/",
|
http.HandleFunc("/group/",
|
||||||
func(w http.ResponseWriter, r *http.Request) {
|
func(w http.ResponseWriter, r *http.Request) {
|
||||||
mungeHeader(w)
|
mungeHeader(w)
|
||||||
http.ServeFile(w, r, staticRoot+"/sfu.html")
|
http.ServeFile(w, r,
|
||||||
|
filepath.Join(staticRoot, "sfu.html"))
|
||||||
})
|
})
|
||||||
http.HandleFunc("/recordings",
|
http.HandleFunc("/recordings",
|
||||||
func(w http.ResponseWriter, r *http.Request) {
|
func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -33,6 +34,12 @@ func webserver() {
|
||||||
})
|
})
|
||||||
http.HandleFunc("/recordings/", recordingsHandler)
|
http.HandleFunc("/recordings/", recordingsHandler)
|
||||||
http.HandleFunc("/ws", wsHandler)
|
http.HandleFunc("/ws", wsHandler)
|
||||||
|
http.HandleFunc("/ice-servers.json",
|
||||||
|
func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
mungeHeader(w)
|
||||||
|
http.ServeFile(w, r,
|
||||||
|
filepath.Join(dataDir, "ice-servers.json"))
|
||||||
|
})
|
||||||
http.HandleFunc("/public-groups.json", publicHandler)
|
http.HandleFunc("/public-groups.json", publicHandler)
|
||||||
http.HandleFunc("/stats", statsHandler)
|
http.HandleFunc("/stats", statsHandler)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue