diff --git a/Makefile b/Makefile index 5ffc01b..9397bef 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ -.PHONY: all build deps +.PHONY: all build lint -all: build +all: lint build + +lint: + golint ./... build: rm -rf build/ mkdir build/ -# golint ./... CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/smartswitch-server ./cmd/smartswitch-server diff --git a/build/smartswitch-server b/build/smartswitch-server deleted file mode 100755 index 947dec7..0000000 Binary files a/build/smartswitch-server and /dev/null differ diff --git a/cmd/smartswitch-server/main.go b/cmd/smartswitch-server/main.go index 06670b8..b05598a 100644 --- a/cmd/smartswitch-server/main.go +++ b/cmd/smartswitch-server/main.go @@ -48,7 +48,8 @@ func initWebhooks(filename string) { } 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) { diff --git a/docker-compose.yml b/docker-compose.yml index 55870e6..4c0faba 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,8 @@ services: build: . environment: DEBUG: "true" - PORT: "80" WEBHOOK_CONFIG_FILE: "/config/webhooks.yml" volumes: - "./webhooks.yml.example:/config/webhooks.yml" ports: - - "80:80" + - "7200:7200"