Permalink
Browse files

Docker build updates

  • Loading branch information...
jeffjenkins committed Dec 12, 2015
1 parent e485c17 commit 1f8d77de1d2e4673c0f37bd1d0a6a30dd24d8e74
Showing with 37 additions and 22 deletions.
  1. +9 −11 Dockerfile
  2. +8 −8 Makefile
  3. +12 −2 README.md
  4. +8 −0 config.default.json
  5. +0 −1 dev/config.json
View
@@ -5,25 +5,23 @@
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 mkdir -p /app/dispatchd && mkdir -p /data/dispatchd/
RUN yum install -y python-setuptools.noarch gcc-c++ glibc-headers
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 BUILD_DIR /app/dispatchd/src/github.com/jeffjenkins/dispatchd/
RUN mkdir -p $BUILD_DIR
COPY . $BUILD_DIR
ENV GOPATH /app/dispatchd
RUN cd /app/dispatchd/src/github.com/jeffjenkins/dispatchd/ && PATH=$PATH:$GOPATH/bin make install
RUN cd $BUILD_DIR && 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"]
ENV STATIC_PATH $BUILD_DIR/static
RUN cp $BUILD_DIR/config.default.json /etc/dispatchd.json
CMD ["/app/dispatchd/bin/server", "-config-file=/etc/dispatchd.json", "-persist-dir=/data/dispatchd/"]
View
@@ -13,14 +13,14 @@ protoc_present:
which protoc
deps:
go get github.com/boltdb/bolt
go get github.com/gogo/protobuf/gogoproto
go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/protoc-gen-gogo
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
go get github.com/boltdb/bolt \
github.com/gogo/protobuf/gogoproto \
github.com/gogo/protobuf/proto \
github.com/gogo/protobuf/protoc-gen-gogo \
github.com/rcrowley/go-metrics \
github.com/streadway/amqp \
github.com/wadey/gocovmerge \
golang.org/x/crypto/bcrypt
gen_all: deps gen_pb gen_amqp
View
@@ -41,9 +41,19 @@ These options can be overridden if `-config-file` is specified. The config file
Right now the only config file exclusive options are for users and passwords. In the future the config file will have tuning parameters as well.
## Packages
## Running Dispatchd
Dispatchd is currently only packaged as a docker image
Dispatchd is currently only packaged as a docker image. You can run it with this command:
docker run \
-p=8080:8080 \
-p=5672:5672 \
--volume=YOUR_CONFIG_FILE:/etc/dispatchd.json \
--volume=YOUR_DATA_DIR:/data/dispatchd/ \
dispatchd/dispatchd
Config file can be left out for the default behaviors. The data volume needs
to be specified so that data is persisted outside of the container.
## Security/Auth
View
@@ -0,0 +1,8 @@
{
"amqp-port" : 1111,
"users" : {
"guest" : {
"password_bcrypt_base64" : "JDJhJDExJENobGk4dG5rY0RGemJhTjhsV21xR3VNNnFZZ1ZqTzUzQWxtbGtyMHRYN3RkUHMuYjF5SUt5"
}
}
}
View
@@ -1,5 +1,4 @@
{
"amqp-port" : 1111,
"users" : {
"guest" : {
"password_bcrypt_base64" : "JDJhJDExJENobGk4dG5rY0RGemJhTjhsV21xR3VNNnFZZ1ZqTzUzQWxtbGtyMHRYN3RkUHMuYjF5SUt5"

0 comments on commit 1f8d77d

Please sign in to comment.