diff --git a/Justfile b/Justfile index ffe4217868..b411154ea2 100644 --- a/Justfile +++ b/Justfile @@ -219,17 +219,11 @@ debug *args: # `just otel-dev` with any args you would pass to `ftl dev`. To stop the otel stream, run # `just otel-stop` in a third terminal tab. otel-stream: - docker run \ - -p ${OTEL_GRPC_PORT}:${OTEL_GRPC_PORT} \ - -p 55679:55679 \ - otel/opentelemetry-collector:0.104.0 2>&1 | sed 's/\([A-Z].* #\)/\ - \1/g' - -# Stop the docker container running otel. -otel-container-id := `docker ps -f ancestor=otel/opentelemetry-collector:0.104.0 | tail -1 | cut -d " " -f1` + docker compose --profile infra up otel-collector +# Stop the otel collector container. otel-stop: - docker stop "{{otel-container-id}}" + docker compose --profile infra down otel-collector # Run `ftl dev` with the given args after setting the necessary envar. otel-dev *args: diff --git a/docker-compose.yml b/docker-compose.yml index 2f4d8a1cc7..51b3c7b0ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,11 +25,11 @@ services: platform: linux/amd64 restart: unless-stopped stdin_open: true # docker run -i - tty: true # docker run -t + tty: true # docker run -t ports: - 3000:3000 # Portal Endpoint - - ${OTEL_GRPC_PORT}:4317 # OTLP GRPC Collector - - ${OTEL_HTTP_PORT}:4318 # OTLP HTTP Collector + - ${OTEL_GRPC_PORT:-4317}:4317 # OTLP GRPC Collector + - ${OTEL_HTTP_PORT:-4317}:4318 # OTLP HTTP Collector environment: - GF_SECURITY_ADMIN_PASSWORD=admin volumes: @@ -43,6 +43,7 @@ services: ports: - 4317:4317 # OTLP gRPC receiver - 4318:4318 # OTLP http receiver + - 55679:55679 localstack: image: localstack/localstack profiles: @@ -54,4 +55,4 @@ services: DEBUG: 1 volumes: - grafana-storage: {} \ No newline at end of file + grafana-storage: {}