From bd55269b39131a111c5070c763bf9d1718b1f2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Sch=C3=A4fer?= Date: Tue, 7 Oct 2025 12:37:16 +0200 Subject: [PATCH] feat: Add .env.example file and update docker-compose to use environment variables --- .env.example | 5 +++++ .gitignore | 1 + docker-compose.metrics.yml | 9 ++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .env.example 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: