Permalink
Browse files

dispatchd Dockerfile!

  • Loading branch information...
jeffjenkins committed Dec 11, 2015
1 parent 36e4542 commit e17afede8ec3a8fa43837982fb4d0d1f1760bc82
Showing with 37 additions and 3 deletions.
  1. +2 −0 .dockerignore
  2. +29 −0 Dockerfile
  3. +6 −3 Makefile
View
@@ -0,0 +1,2 @@
scripts/external/
.git
View
@@ -0,0 +1,29 @@
#
# Everything about this is kind of gross, but it does get a server running
#
FROM centos:latest
# OS setup
RUN yum install -y make golang git
RUN mkdir -p /app/dispatchd
RUN yum install -y python-setuptools.noarch
RUN easy_install mako
RUN yum install -y gcc-c++ glibc-headers
# protobuf
RUN cd /tmp && curl -L -o protobuf-2.6.1.tar.gz https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
RUN cd /tmp && tar -xzf protobuf-2.6.1.tar.gz
RUN cd /tmp/protobuf-2.6.1/ && ./configure && make install
# Build dispatchd
RUN mkdir -p /app/dispatchd/src/github.com/jeffjenkins/dispatchd/
COPY . /app/dispatchd/src/github.com/jeffjenkins/dispatchd/
ENV GOPATH /app/dispatchd
RUN cd /app/dispatchd/src/github.com/jeffjenkins/dispatchd/ && PATH=$PATH:$GOPATH/bin make install
# Runtime configuration
# TODO: when running for real this should have a volume for
# the database directories
RUN mkdir -p /data/dispatchd/
ENV STATIC_PATH /app/dispatchd/src/github.com/jeffjenkins/dispatchd/static
ENTRYPOINT ["/app/dispatchd/bin/server"]
View
@@ -1,6 +1,6 @@
.PHONY: all protoc_present deps gen_all gen_pb gen_amqp build test full_coverage \
real_line_count devserver benchmark_dev benchmark
real_line_count devserver benchmark_dev benchmark install
PROTOC := protoc -I=${GOPATH}/src:${GOPATH}/src/github.com/gogo/protobuf/protobuf/:.
@@ -20,6 +20,7 @@ deps:
go get github.com/rcrowley/go-metrics
go get github.com/streadway/amqp
go get github.com/wadey/gocovmerge
go get golang.org/x/crypto/bcrypt
gen_all: deps gen_pb gen_amqp
@@ -36,6 +37,9 @@ gen_amqp:
build: deps gen_all
go build -o dispatchd github.com/jeffjenkins/dispatchd/server
install: deps gen_all
go install github.com/jeffjenkins/dispatchd/server
test: deps gen_all
go test -cover github.com/jeffjenkins/dispatchd/...
@@ -52,7 +56,7 @@ ${PERF_SCRIPT}:
tar -C scripts/external/ -zxf scripts/external/perf-client.tar.gz
mv scripts/external/rabbitmq-java-client-bin-3.5.6 scripts/external/perf-client/
devserver: gen_all
devserver: install
go install github.com/jeffjenkins/dispatchd/server
STATIC_PATH=${GOPATH}/src/github.com/jeffjenkins/dispatchd/static \
${GOPATH}/bin/server \
@@ -64,4 +68,3 @@ benchmark_dev: scripts/external/perf-client/runjava.sh
benchmark: scripts/external/perf-client/runjava.sh
RUN_PORT=${RUN_PORT} scripts/benchmark_helper.sh

0 comments on commit e17afed

Please sign in to comment.