Move secrets to .env file, add .env.example, gitignore .env
This commit is contained in:
parent
f18c44b869
commit
4037c74e0f
3 changed files with 11 additions and 9 deletions
6
.env.example
Normal file
6
.env.example
Normal file
|
|
@ -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
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
*.log
|
*.log
|
||||||
|
.env
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,12 @@ services:
|
||||||
- ./:/app
|
- ./:/app
|
||||||
command: sh -c "npm install --silent && node server.js"
|
command: sh -c "npm install --silent && node server.js"
|
||||||
ports:
|
ports:
|
||||||
- "3737:3737"
|
- "${PORT:-3737}:${PORT:-3737}"
|
||||||
environment:
|
env_file:
|
||||||
BG_BEARER_TOKEN: "bg_live_k_K1zO7Jh-fMkRttp8.uoD4OzE3L_SrLXu0tTsS_4nDdL8DkhzRV6eOSXSkivY"
|
- .env
|
||||||
BG_EVENT_ID: "1"
|
|
||||||
BG_RANKING: "stableford_gross"
|
|
||||||
POLL_INTERVAL_MS: "10000"
|
|
||||||
STALE_THRESHOLD_MS: "60000"
|
|
||||||
PORT: "3737"
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget", "-qO-", "http://localhost:3737/ping"]
|
test: ["CMD", "wget", "-qO-", "http://localhost:${PORT:-3737}/ping"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue