Correct configuration, improve logging.
This commit is contained in:
parent
f363151045
commit
0cdafa2104
8
Makefile
8
Makefile
|
@ -1,9 +1,11 @@
|
||||||
.PHONY: all build deps
|
.PHONY: all build lint
|
||||||
|
|
||||||
all: build
|
all: lint build
|
||||||
|
|
||||||
|
lint:
|
||||||
|
golint ./...
|
||||||
|
|
||||||
build:
|
build:
|
||||||
rm -rf build/
|
rm -rf build/
|
||||||
mkdir build/
|
mkdir build/
|
||||||
# golint ./...
|
|
||||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/smartswitch-server ./cmd/smartswitch-server
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/smartswitch-server ./cmd/smartswitch-server
|
||||||
|
|
Binary file not shown.
|
@ -48,7 +48,8 @@ func initWebhooks(filename string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func runServer() {
|
func runServer() {
|
||||||
http.ListenAndServe(":"+viper.GetString("ListenPort"), nil)
|
log.Printf("Starting server on port %s", viper.GetString("ListenPort"))
|
||||||
|
log.Fatal(http.ListenAndServe(":"+viper.GetString("ListenPort"), nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeWebhookHandler(hook webhook) func(http.ResponseWriter, *http.Request) {
|
func makeWebhookHandler(hook webhook) func(http.ResponseWriter, *http.Request) {
|
||||||
|
|
|
@ -5,9 +5,8 @@ services:
|
||||||
build: .
|
build: .
|
||||||
environment:
|
environment:
|
||||||
DEBUG: "true"
|
DEBUG: "true"
|
||||||
PORT: "80"
|
|
||||||
WEBHOOK_CONFIG_FILE: "/config/webhooks.yml"
|
WEBHOOK_CONFIG_FILE: "/config/webhooks.yml"
|
||||||
volumes:
|
volumes:
|
||||||
- "./webhooks.yml.example:/config/webhooks.yml"
|
- "./webhooks.yml.example:/config/webhooks.yml"
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "7200:7200"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user