mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-12-03 14:51:05 +01:00
add interface variable to settings
This commit is contained in:
parent
7503c81d8e
commit
373f3d1e8e
@ -36,6 +36,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("Semaphore %v\n", util.Version)
|
fmt.Printf("Semaphore %v\n", util.Version)
|
||||||
|
fmt.Printf("Interface %v\n", util.Config.Interface)
|
||||||
fmt.Printf("Port %v\n", util.Config.Port)
|
fmt.Printf("Port %v\n", util.Config.Port)
|
||||||
fmt.Printf("MySQL %v@%v %v\n", util.Config.MySQL.Username, util.Config.MySQL.Hostname, util.Config.MySQL.DbName)
|
fmt.Printf("MySQL %v@%v %v\n", util.Config.MySQL.Username, util.Config.MySQL.Hostname, util.Config.MySQL.DbName)
|
||||||
fmt.Printf("Tmp Path (projects home) %v\n", util.Config.TmpPath)
|
fmt.Printf("Tmp Path (projects home) %v\n", util.Config.TmpPath)
|
||||||
@ -64,7 +65,7 @@ func main() {
|
|||||||
var router http.Handler = api.Route()
|
var router http.Handler = api.Route()
|
||||||
router = handlers.ProxyHeaders(router)
|
router = handlers.ProxyHeaders(router)
|
||||||
http.Handle("/", router)
|
http.Handle("/", router)
|
||||||
err := http.ListenAndServe(util.Config.Port, nil)
|
err := http.ListenAndServe(util.Config.Interface+util.Config.Port, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,13 @@ type ldapMappings struct {
|
|||||||
type configType struct {
|
type configType struct {
|
||||||
MySQL mySQLConfig `json:"mysql"`
|
MySQL mySQLConfig `json:"mysql"`
|
||||||
// Format `:port_num` eg, :3000
|
// Format `:port_num` eg, :3000
|
||||||
|
// if : is missing it will be corrected
|
||||||
Port string `json:"port"`
|
Port string `json:"port"`
|
||||||
|
|
||||||
|
// Interface ip, put in front of the port.
|
||||||
|
// defaults to empty
|
||||||
|
Interface string `json:"interface"`
|
||||||
|
|
||||||
// semaphore stores ephemeral projects here
|
// semaphore stores ephemeral projects here
|
||||||
TmpPath string `json:"tmp_path"`
|
TmpPath string `json:"tmp_path"`
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user