diff --git a/docker-compose.yml b/docker-compose.yml index 0249e81..5a51e1c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -34,9 +34,10 @@ services: DATABASE_PATH: /app/data/database.sqlite FARMACIAS_WEBHOOK_URL: ${FARMACIAS_WEBHOOK_URL:-} PG_URL: postgresql://farmafinder:${PG_PASSWORD:-change-me-in-production}@postgres:5432/farmafinder - # OpenTelemetry — exported via OTLP gRPC to the shared Alloy collector + # OpenTelemetry — exported via OTLP gRPC to the shared Alloy collector. + # When the stack runs on 192.168.1.84, send traces to that host. OTEL_SERVICE_NAME: farmafinder-backend - OTEL_EXPORTER_OTLP_ENDPOINT: http://host.docker.internal:4317 + OTEL_EXPORTER_OTLP_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://192.168.1.84:4317} OTEL_TRACES_EXPORTER: otlp OTEL_LOGS_EXPORTER: otlp OTEL_RESOURCE_ATTRIBUTES: service.namespace=farmafinder @@ -51,7 +52,7 @@ services: build: context: ./frontend args: - VITE_FARO_ENDPOINT: ${VITE_FARO_ENDPOINT:-http://localhost:4318} + VITE_FARO_ENDPOINT: ${VITE_FARO_ENDPOINT:-http://192.168.1.84:4318} VITE_FARO_APP_NAME: ${VITE_FARO_APP_NAME:-farmafinder-frontend} VITE_FARO_ENV: ${VITE_FARO_ENV:-production} VITE_FARO_APP_VERSION: ${VITE_FARO_APP_VERSION:-1.0.0} diff --git a/frontend/.env.example b/frontend/.env.example index d6309f0..2b18959 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -3,10 +3,10 @@ # Copy to .env and adjust as needed for local dev. # OTLP HTTP endpoint of the Grafana Alloy collector. -# In Docker on the same host as Alloy, use http://localhost:4318 (the -# container's perspective of the host). For external deploys, use the -# Alloy's public URL, e.g. https://alloy.example.com. -VITE_FARO_ENDPOINT=http://localhost:4318 +# In Docker on the same host as Alloy, use the collector hostname or IP, +# for example http://192.168.1.84:4318. +# For external deploys, use the Alloy's public URL, e.g. https://alloy.example.com. +VITE_FARO_ENDPOINT=http://192.168.1.84:4318 # App name shown in Grafana Explore / Faro data source. VITE_FARO_APP_NAME=farmaclic-frontend