diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..d862b87ba2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu +MAINTAINER Johannes 'fish' Ziemke (@discordianfish) + +RUN apt-get update && apt-get install -yq curl git mercurial make +RUN curl -s https://go.googlecode.com/files/go1.2.linux-amd64.tar.gz | tar -C /usr/local -xzf - +ENV PATH /usr/local/go/bin:$PATH +ENV GOPATH /go + +ADD . /go/src/github.com/prometheus/alertmanager +RUN make -C /go/src/github.com/prometheus/alertmanager build + +WORKDIR /alertmanager +ENTRYPOINT [ "/go/src/github.com/prometheus/alertmanager/alertmanager" ] +EXPOSE 9090 diff --git a/Makefile b/Makefile index 73fb503766..866b7c5a0d 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,8 @@ include Makefile.INCLUDE all: build test build: config web - $(GO) build $(BUILDFLAGS) + go get -d + go build $(BUILDFLAGS) config: $(MAKE) -C config @@ -27,7 +28,7 @@ web: $(MAKE) -C web test: build - $(GO) test -v ./... + go test -v ./... clean: $(MAKE) -C web clean diff --git a/Makefile.INCLUDE b/Makefile.INCLUDE index 7b1374b9b0..466fa08664 100644 --- a/Makefile.INCLUDE +++ b/Makefile.INCLUDE @@ -15,10 +15,6 @@ .SUFFIXES: -GO := $(GOROOT)/bin/go -GOFMT := $(GOROOT)/bin/gofmt -GO_VERSION := 1.1 - REV := $(shell git rev-parse --short HEAD) BRANCH := $(shell git rev-parse --abbrev-ref HEAD) HOSTNAME := $(shell hostname -f) @@ -27,5 +23,4 @@ BUILDFLAGS := -ldflags \ "-X main.buildVersion $(REV)\ -X main.buildBranch $(BRANCH)\ -X main.buildUser $(USER)@$(HOSTNAME)\ - -X main.buildDate $(BUILD_DATE)\ - -X main.goVersion $(GO_VERSION)" + -X main.buildDate $(BUILD_DATE)" diff --git a/README.md b/README.md index 314d5e6db3..72f1a1a669 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ alertmanager ============= -Prometheus Alert Manager +The Prometheus Alert Manager. + + +See [config/fixtures/sample.conf.input](config/fixtures/sample.conf.input) for a example config. diff --git a/build_info.go b/build_info.go index 6ed4aecb12..b43ac70bfe 100644 --- a/build_info.go +++ b/build_info.go @@ -29,11 +29,10 @@ var ( // BuildInfo encapsulates compile-time metadata about Prometheus made available // via go tool ld such that this can be reported on-demand. var BuildInfo = map[string]string{ - "version": buildVersion, - "branch": buildBranch, - "user": buildUser, - "date": buildDate, - "go_version": goVersion, + "version": buildVersion, + "branch": buildBranch, + "user": buildUser, + "date": buildDate, } var versionInfoTmpl = template.Must(template.New("version").Parse(