-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config sources, environment variable config, and Dockerfile
- Loading branch information
Silas Davis
committed
Sep 29, 2017
1 parent
3fdbb1d
commit f8c3820
Showing
35 changed files
with
597 additions
and
2,039 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
FROM circleci/golang:1.8 | ||
|
||
# This Dockerfile is to generate the docker build image for CI services | ||
# See the update_docker_image Make target | ||
|
||
RUN curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip | ||
RUN unzip protoc-3.3.0-linux-x86_64.zip -d protobuf | ||
RUN sudo cp protobuf/bin/protoc /usr/bin/protoc | ||
RUN rm -rf protobuf protoc-* | ||
RUN go get -u golang.org/x/tools/cmd/goimports | ||
RUN go get -u github.com/golang/protobuf/protoc-gen-go | ||
RUN go get -u github.com/Masterminds/glide | ||
RUN go get -u github.com/goreleaser/goreleaser | ||
# We use a multistage build to avoid bloating our deployment image with build dependencies | ||
FROM golang:1.9.0-alpine3.6 as builder | ||
MAINTAINER Monax <[email protected]> | ||
|
||
RUN apk add --no-cache --update git | ||
|
||
ARG REPO=$GOPATH/src/github.com/monax/hoard | ||
COPY . $REPO | ||
WORKDIR $REPO | ||
|
||
# Build purely static binaries | ||
RUN go build --ldflags '-extldflags "-static"' -o bin/hoard ./cmd/hoard | ||
|
||
# This will be our base container image | ||
FROM alpine:3.6 | ||
|
||
ARG REPO=/go/src/github.com/monax/hoard | ||
|
||
# Copy binaries built in previous stage | ||
COPY --from=builder $REPO/bin/* /usr/local/bin/ | ||
|
||
EXPOSE 53431 | ||
|
||
ENV HOARD_JSON_CONFIG '{"ListenAddress":"tcp://:53431","Storage":{"StorageType":"memory","AddressEncoding":"base64"},"Logging":{"LoggingType":"logfmt","Channels":["info","trace"]}}' | ||
|
||
CMD [ "hoard", "-e", "-l" ] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
|
||
# Gopkg.toml example | ||
# | ||
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md | ||
# for detailed Gopkg.toml documentation. | ||
# | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project" | ||
# version = "1.0.0" | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project2" | ||
# branch = "dev" | ||
# source = "github.com/myfork/project2" | ||
# | ||
# [[override]] | ||
# name = "github.com/x/y" | ||
# version = "2.4.0" | ||
|
||
|
||
[[constraint]] | ||
name = "github.com/BurntSushi/toml" | ||
version = "0.3.0" | ||
|
||
[[constraint]] | ||
name = "github.com/OneOfOne/xxhash" | ||
version = "1.2.0" | ||
|
||
[[constraint]] | ||
name = "github.com/aws/aws-sdk-go" | ||
version = "1.12.1" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/cep21/xdgbasedir" | ||
|
||
[[constraint]] | ||
name = "github.com/eapache/channels" | ||
version = "1.1.0" | ||
|
||
[[constraint]] | ||
name = "github.com/go-kit/kit" | ||
version = "0.5.0" | ||
|
||
[[constraint]] | ||
name = "github.com/go-stack/stack" | ||
version = "1.6.0" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/golang/protobuf" | ||
|
||
[[constraint]] | ||
name = "github.com/jawher/mow.cli" | ||
version = "1.0.2" | ||
|
||
[[constraint]] | ||
name = "github.com/stretchr/testify" | ||
version = "1.1.4" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "golang.org/x/crypto" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "golang.org/x/net" | ||
|
||
[[constraint]] | ||
name = "google.golang.org/grpc" | ||
version = "1.6.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.