mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-12-17 22:20:11 +01:00
Merge pull request #540 from twhiston/interface_setting
add interface variable to settings
This commit is contained in:
commit
bfe1a4f60b
@ -36,6 +36,7 @@ func main() {
|
||||
}
|
||||
|
||||
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("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)
|
||||
@ -64,7 +65,7 @@ func main() {
|
||||
var router http.Handler = api.Route()
|
||||
router = handlers.ProxyHeaders(router)
|
||||
http.Handle("/", router)
|
||||
err := http.ListenAndServe(util.Config.Port, nil)
|
||||
err := http.ListenAndServe(util.Config.Interface+util.Config.Port, nil)
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
}
|
||||
|
@ -49,8 +49,13 @@ type ldapMappings struct {
|
||||
type configType struct {
|
||||
MySQL mySQLConfig `json:"mysql"`
|
||||
// Format `:port_num` eg, :3000
|
||||
// if : is missing it will be corrected
|
||||
Port string `json:"port"`
|
||||
|
||||
// Interface ip, put in front of the port.
|
||||
// defaults to empty
|
||||
Interface string `json:"interface"`
|
||||
|
||||
// semaphore stores ephemeral projects here
|
||||
TmpPath string `json:"tmp_path"`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user