mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-19 07:18:25 +00:00
On notification server, get server host and port from environement if set (#728)
This commit is contained in:
parent
c11e8ccbe9
commit
da31024f8f
@ -11,6 +11,7 @@ import (
|
|||||||
"os/signal"
|
"os/signal"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
"strconv"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -45,8 +46,18 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func loadNotifConfig() {
|
func loadNotifConfig() {
|
||||||
|
host := os.Getenv("NOTIFICATION_SERVER_HOST")
|
||||||
|
if host == "" {
|
||||||
host = "0.0.0.0"
|
host = "0.0.0.0"
|
||||||
|
}
|
||||||
|
|
||||||
port = 8083
|
port = 8083
|
||||||
|
if os.Getenv("NOTIFICATION_SERVER_PORT") != "" {
|
||||||
|
i, err := strconv.Atoi(os.Getenv("NOTIFICATION_SERVER_PORT"))
|
||||||
|
if err == nil {
|
||||||
|
port = i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
logLevel := os.Getenv("NOTIFICATION_SERVER_LOG_LEVEL")
|
logLevel := os.Getenv("NOTIFICATION_SERVER_LOG_LEVEL")
|
||||||
if logLevel == "" {
|
if logLevel == "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user