Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerize! #14

Merged
merged 2 commits into from
Apr 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu
MAINTAINER Johannes 'fish' Ziemke <[email protected]> (@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
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,7 +28,7 @@ web:
$(MAKE) -C web

test: build
$(GO) test -v ./...
go test -v ./...

clean:
$(MAKE) -C web clean
Expand Down
7 changes: 1 addition & 6 deletions Makefile.INCLUDE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)"
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 4 additions & 5 deletions build_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down