diff --git a/.env b/.env index 8383b2ec71..f85b34f366 100644 --- a/.env +++ b/.env @@ -25,6 +25,8 @@ ENV_PLATFORM=local OTEL_COLLECTOR_HOST=otelcol OTEL_COLLECTOR_PORT_GRPC=4317 OTEL_COLLECTOR_PORT_HTTP=4318 +OTEL_COLLECTOR_CONFIG=./src/otelcollector/otelcol-config.yml +OTEL_COLLECTOR_CONFIG_EXTRAS=./src/otelcollector/otelcol-config-extras.yml OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_GRPC} PUBLIC_OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:8080/otlp-http/v1/traces diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml index 2f8a5eae88..5720b4e0c8 100644 --- a/docker-compose.minimal.yml +++ b/docker-compose.minimal.yml @@ -584,8 +584,8 @@ services: restart: unless-stopped command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ] volumes: - - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml - - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml + - ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml + - ${OTEL_COLLECTOR_CONFIG_EXTRAS}:/etc/otelcol-config-extras.yml ports: - "${OTEL_COLLECTOR_PORT_GRPC}" - "${OTEL_COLLECTOR_PORT_HTTP}" diff --git a/docker-compose.yml b/docker-compose.yml index 3848155f35..bf2c75a3c9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -694,8 +694,8 @@ services: restart: unless-stopped command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ] volumes: - - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml - - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml + - ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml + - ${OTEL_COLLECTOR_CONFIG_EXTRAS}:/etc/otelcol-config-extras.yml ports: - "${OTEL_COLLECTOR_PORT_GRPC}" - "${OTEL_COLLECTOR_PORT_HTTP}"