From 4037c74e0f3117ebb3dc058be3167d7409cd3804 Mon Sep 17 00:00:00 2001 From: Zac Gaetano Date: Thu, 9 Apr 2026 08:34:55 -0400 Subject: [PATCH] Move secrets to .env file, add .env.example, gitignore .env --- .env.example | 6 ++++++ .gitignore | 1 + docker-compose.yml | 13 ++++--------- 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..3bb5569 --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +BG_BEARER_TOKEN=your_token_here +BG_EVENT_ID=1 +BG_RANKING=stableford_gross +POLL_INTERVAL_MS=10000 +STALE_THRESHOLD_MS=60000 +PORT=3737 diff --git a/.gitignore b/.gitignore index 552f221..53a89d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ *.log +.env diff --git a/docker-compose.yml b/docker-compose.yml index 1078294..770a3db 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,17 +7,12 @@ services: - ./:/app command: sh -c "npm install --silent && node server.js" ports: - - "3737:3737" - environment: - BG_BEARER_TOKEN: "bg_live_k_K1zO7Jh-fMkRttp8.uoD4OzE3L_SrLXu0tTsS_4nDdL8DkhzRV6eOSXSkivY" - BG_EVENT_ID: "1" - BG_RANKING: "stableford_gross" - POLL_INTERVAL_MS: "10000" - STALE_THRESHOLD_MS: "60000" - PORT: "3737" + - "${PORT:-3737}:${PORT:-3737}" + env_file: + - .env restart: unless-stopped healthcheck: - test: ["CMD", "wget", "-qO-", "http://localhost:3737/ping"] + test: ["CMD", "wget", "-qO-", "http://localhost:${PORT:-3737}/ping"] interval: 15s timeout: 5s retries: 3