Skip to content

Commit

Permalink
move Dockerfile and docker-compose.yml into example dir
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Hsu <[email protected]>
  • Loading branch information
andrewhsu committed Apr 16, 2020
1 parent cd7d79c commit 797ec0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
4 changes: 0 additions & 4 deletions Dockerfile → example/http/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ CMD ["/go/bin/server"]
FROM base AS example-http-client
RUN go install ./example/http/client/client.go
CMD ["/go/bin/client"]

FROM base AS example-zipkin-client
RUN go install ./example/zipkin/main.go
CMD ["/go/bin/main"]
24 changes: 4 additions & 20 deletions docker-compose.yml → example/http/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,20 @@ version: "3.7"
services:
http-server:
build:
context: .
dockerfile: $PWD/Dockerfile
context: ../..
target: example-http-server
networks:
- example
http-client:
build:
context: .
dockerfile: $PWD/Dockerfile
context: ../..
target: example-http-client
command: ["/go/bin/client", "-server", "http://http-server:7777/hello"]
networks:
- example
depends_on:
- http-server
zipkin-collector:
image: openzipkin/zipkin-slim:latest
ports:
- "9411:9411"
networks:
- example
zipkin-client:
build:
context: .
target: example-zipkin-client
command:
- "/bin/sh"
- "-c"
- "while ! nc -w 1 -z zipkin-collector 9411; do echo sleep for 1s waiting for zipkin-collector to become available; sleep 1; done && /go/bin/main -zipkin http://zipkin-collector:9411/api/v2/spans"
networks:
- example
depends_on:
- zipkin-collector
networks:
example:

0 comments on commit 797ec0e

Please sign in to comment.