diff --git a/samples/java-protobuf-tracing/.env b/samples/java-protobuf-tracing/.env index 73b8885d27..dcdc6f9863 100644 --- a/samples/java-protobuf-tracing/.env +++ b/samples/java-protobuf-tracing/.env @@ -1,2 +1,11 @@ -USER_SERVICE_HOST=host.docker.internal +# this is the port where the kalix runtime container will be exposed +# when running multiple services on your local machine, make sure that this port is unique +ADVERTISED_HTTP_PORT=9000 + +# this is the port where the user services (your application) will open +# when running multiple services on your local machine, make sure that this port is unique USER_SERVICE_PORT=8080 + +# this variable defines the host where the kalix runtime (running in docker) +# will reach the user service in local development +USER_SERVICE_HOST=host.docker.internal diff --git a/samples/java-protobuf-tracing/docker-compose.yml b/samples/java-protobuf-tracing/docker-compose.yml index 62442417f5..d7311653a8 100644 --- a/samples/java-protobuf-tracing/docker-compose.yml +++ b/samples/java-protobuf-tracing/docker-compose.yml @@ -8,17 +8,16 @@ services: image: gcr.io/kalix-public/kalix-runtime:1.1.34 container_name: tracing ports: - - "9000:9000" + - "${ADVERTISED_HTTP_PORT}:9000" extra_hosts: - "host.docker.internal:host-gateway" environment: JAVA_TOOL_OPTIONS: > -Dkalix.proxy.telemetry.tracing.enabled=true -Dkalix.proxy.telemetry.tracing.collector-endpoint=http://jaeger:4317 + ADVERTISED_HTTP_PORT: ${ADVERTISED_HTTP_PORT} USER_SERVICE_HOST: ${USER_SERVICE_HOST} USER_SERVICE_PORT: ${USER_SERVICE_PORT} - # Comment to enable ACL check in dev-mode (see https://docs.kalix.io/services/using-acls.html#_local_development_with_acls) - ACL_ENABLED: "false" jaeger: image: jaegertracing/all-in-one:1.54 ports: