diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..0697458 --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +# Copy this file to .env and fill in your values +# Required for connecting to Pangolin service +PANGOLIN_ENDPOINT=https://example.com +NEWT_ID=changeme-id +NEWT_SECRET=changeme-secret \ No newline at end of file diff --git a/.gitignore b/.gitignore index d14efa9..ee03c76 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ nohup.out *.iml certs/ newt_arm64 +.env diff --git a/docker-compose.metrics.yml b/docker-compose.metrics.yml index 89c152c..69746f1 100644 --- a/docker-compose.metrics.yml +++ b/docker-compose.metrics.yml @@ -11,6 +11,8 @@ services: newt: build: . image: newt:dev + env_file: + - .env environment: OTEL_SERVICE_NAME: newt NEWT_METRICS_PROMETHEUS_ENABLED: "true" @@ -19,13 +21,18 @@ services: OTEL_EXPORTER_OTLP_INSECURE: "true" OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "cumulative" NEWT_ADMIN_ADDR: "0.0.0.0:2112" + # Base NEWT configuration + PANGOLIN_ENDPOINT: ${PANGOLIN_ENDPOINT} + NEWT_ID: ${NEWT_ID} + NEWT_SECRET: ${NEWT_SECRET} + LOG_LEVEL: "DEBUG" ports: - "2112:2112" depends_on: - collector prometheus: - image: prom/prometheus:v2.55.0 + image: prom/prometheus:v3.6.0 volumes: - ./examples/prometheus.yml:/etc/prometheus/prometheus.yml:ro ports: