Skip to content

Commit

Permalink
added a docker-compose for hotrod
Browse files Browse the repository at this point in the history
Signed-off-by: mehul gautam <mehulsharma4786@gamil.com>
  • Loading branch information
mehul gautam committed Jul 13, 2024
1 parent c6d7e17 commit c2b6309
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
38 changes: 38 additions & 0 deletions docker-compose/hotrod/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: '3.7'

# To run a specific version of Jaeger, use environment variable, e.g.:
# JAEGER_VERSION=1.52 docker compose up

services:
jaeger:
image: jaegertracing/all-in-one:${JAEGER_VERSION:-latest}
ports:
- "16686:16686"
- "4317:4317"
- "4318:4318"
environment:
- LOG_LEVEL=debug
# Since v0.105 the OTEL Collector components default hostname to 'localhost'.
# However, that does not work inside a Docker container, so we listen on all IPs.
- COLLECTOR_OTLP_GRPC_HOST_PORT=0.0.0.0:4317
- COLLECTOR_OTLP_HTTP_HOST_PORT=0.0.0.0:4318
networks:
- jaeger-example
hotrod:
image: localhost:5000/jaegertracing/example-hotrod:${GITHUB_SHA:-latest}
# To run the latest trunk build, find the tag at Docker Hub and use the line below
# https://hub.docker.com/r/jaegertracing/example-hotrod-snapshot/tags
#image: jaegertracing/example-hotrod-snapshot:0ab8f2fcb12ff0d10830c1ee3bb52b745522db6c
ports:
- "8080:8080"
- "8083:8083"
command: ["all"]
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4318
networks:
- jaeger-example
depends_on:
- jaeger

networks:
jaeger-example:
21 changes: 21 additions & 0 deletions scripts/hotrod_dummy_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

set -euxf -o pipefail

make build-examples GOOS=linux GOARCH=amd64
make build-examples GOOS=linux GOARCH=s390x
make build-examples GOOS=linux GOARCH=ppc64le
make build-examples GOOS=linux GOARCH=arm64

REPO=jaegertracing/example-hotrod
platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64"
make prepare-docker-buildx

# build image locally (-l) for integration test
bash scripts/build-upload-a-docker-image.sh -l -c example-hotrod -d examples/hotrod -p "${platforms}"


docker compose -f ./docker-compose/hotrod/docker-compose.yml up -d

#curl frontend-endpoint
docker compose -f ./docker-compose/hotrod/docker-compose.yml logs hotrod

0 comments on commit c2b6309

Please sign in to comment.