Skip to content
Permalink
Browse files

Proposal to refine docker deployment (#1302)

  • Loading branch information...
DazWilkin authored and gdbelvin committed Jun 20, 2019
1 parent 90262f7 commit adc8c839d21395615a6e864671bdc837a86051ab
@@ -1,12 +1,16 @@
FROM golang:1
FROM golang:1.12 as build

ADD keytransparency/genfiles/* /kt/
ADD ./keytransparency /go/src/github.com/google/keytransparency
ADD ./trillian /go/src/github.com/google/trillian
WORKDIR /go/src/github.com/google/keytransparency
WORKDIR /go/src/github.com/google/keytransparency
COPY . .

ENV GO111MODULE=on
RUN go get -tags="mysql" ./cmd/keytransparency-monitor

ENTRYPOINT ["/go/bin/keytransparency-monitor"]
FROM gcr.io/distroless/base

COPY --from=build /go/bin/keytransparency-monitor /
ADD ./genfiles/* /kt/

ENTRYPOINT ["/keytransparency-monitor"]

EXPOSE 8099
@@ -1,11 +1,14 @@
FROM golang:1
FROM golang:1.12 as build

ADD ./keytransparency /go/src/github.com/google/keytransparency
ADD ./trillian /go/src/github.com/google/trillian
WORKDIR /go/src/github.com/google/keytransparency
WORKDIR /go/src/github.com/google/keytransparency
COPY . .

ENV GO111MODULE=on
RUN go get -tags="mysql" ./cmd/keytransparency-sequencer

# Specify mandatory flags via the docker command-line or using docker-compose.
# See the README.md file on how to use docker-compose.
ENTRYPOINT ["/go/bin/keytransparency-sequencer"]
FROM gcr.io/distroless/base

COPY --from=build /go/bin/keytransparency-sequencer /
ADD ./genfiles/* /kt/

ENTRYPOINT ["/keytransparency-sequencer"]
@@ -1,14 +1,16 @@
FROM golang:1
FROM golang:1.12 as build

ADD keytransparency/genfiles/* /kt/
ADD ./keytransparency /go/src/github.com/google/keytransparency
ADD ./trillian /go/src/github.com/google/trillian
WORKDIR /go/src/github.com/google/keytransparency
WORKDIR /go/src/github.com/google/keytransparency
COPY . .

ENV GO111MODULE=on
RUN go get -tags="mysql" ./cmd/keytransparency-server

# Specify mandatory flags via the docker command-line or using docker-compose.
# See the README.md file on how to use docker-compose.
ENTRYPOINT ["/go/bin/keytransparency-server"]
FROM gcr.io/distroless/base

COPY --from=build /go/bin/keytransparency-server /
ADD ./genfiles/* /kt/

ENTRYPOINT ["/keytransparency-server"]

EXPOSE 8080
@@ -42,13 +42,10 @@ services:
MYSQL_USER: test
MYSQL_DATABASE: test

log-server:
log-server:
depends_on:
- db
image: us.gcr.io/key-transparency/log-server:${TRAVIS_COMMIT}
build:
context: ../trillian
dockerfile: examples/deployment/docker/log_server/Dockerfile
image: us.gcr.io/trillian/log-server:latest
restart: always
command:
- --mysql_uri=test:zaphod@tcp(db:3306)/test
@@ -67,10 +64,7 @@ services:
log-signer:
depends_on:
- db
image: us.gcr.io/key-transparency/log-signer:${TRAVIS_COMMIT}
build:
context: ../trillian
dockerfile: examples/deployment/docker/log_signer/Dockerfile
image: us.gcr.io/trillian/log-signer:latest
restart: always
command:
- --mysql_uri=test:zaphod@tcp(db:3306)/test
@@ -92,10 +86,7 @@ services:
map-server:
depends_on:
- db
image: us.gcr.io/key-transparency/map-server:${TRAVIS_COMMIT}
build:
context: ../trillian
dockerfile: examples/deployment/docker/map_server/Dockerfile
image: us.gcr.io/trillian/map-server:latest
restart: always
command:
- --mysql_uri=test:zaphod@tcp(db:3306)/test
@@ -118,8 +109,8 @@ services:
- map-server
image: us.gcr.io/key-transparency/keytransparency-server:${TRAVIS_COMMIT}
build:
context: ..
dockerfile: ./keytransparency/cmd/keytransparency-server/Dockerfile
context: .
dockerfile: ./cmd/keytransparency-server/Dockerfile
restart: always
ports:
- "443:8080" # json & grpc
@@ -149,15 +140,17 @@ services:
- map-server
image: us.gcr.io/key-transparency/keytransparency-sequencer:${TRAVIS_COMMIT}
build:
context: ..
dockerfile: ./keytransparency/cmd/keytransparency-sequencer/Dockerfile
context: .
dockerfile: ./cmd/keytransparency-sequencer/Dockerfile
restart: always
command:
- --force_master
- --db=test:zaphod@tcp(db:3306)/test
- --addr=0.0.0.0:8080
- --log-url=log-server:8090
- --map-url=map-server:8090
- --tls-key=/kt/server.key
- --tls-cert=/kt/server.crt
- --alsologtostderr
- --v=5
ports:
@@ -188,8 +181,8 @@ services:
- sequencer
image: us.gcr.io/key-transparency/keytransparency-monitor:${TRAVIS_COMMIT}
build:
context: ..
dockerfile: ./keytransparency/cmd/keytransparency-monitor/Dockerfile
context: .
dockerfile: ./cmd/keytransparency-monitor/Dockerfile
command:
- --addr=0.0.0.0:8099
- --kt-url=server:8080

0 comments on commit adc8c83

Please sign in to comment.
You can’t perform that action at this time.