mirror of
https://github.com/0x1d/drift-keeper.git
synced 2025-12-16 11:04:31 +01:00
Run container as keeper user, add basic auth to prometheus
This commit is contained in:
@@ -34,7 +34,7 @@ runcmd:
|
|||||||
- git clone https://github.com/0x1d/drift-keeper /app/bot
|
- git clone https://github.com/0x1d/drift-keeper /app/bot
|
||||||
- mv /app/.env /app/bot/.env
|
- mv /app/.env /app/bot/.env
|
||||||
- mv /app/config.yaml /app/bot/config.yaml
|
- mv /app/config.yaml /app/bot/config.yaml
|
||||||
- cd /app/bot && docker-compose up -d
|
- cd /app/bot && sudo -u keeper -g bot -- docker-compose up -d
|
||||||
|
|
||||||
write_files:
|
write_files:
|
||||||
- path: /app/.env
|
- path: /app/.env
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ services:
|
|||||||
container_name: prometheus
|
container_name: prometheus
|
||||||
command:
|
command:
|
||||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||||
#ports:
|
- '--web.config.file=/etc/prometheus/web.yml'
|
||||||
# - 9090:9090
|
ports:
|
||||||
|
- 9090:9090
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./prometheus:/etc/prometheus
|
- ./prometheus:/etc/prometheus
|
||||||
|
|||||||
20
example.env
20
example.env
@@ -9,10 +9,26 @@ GRAFANA_ADMIN_PASSWORD=grafana
|
|||||||
|
|
||||||
# Drift Config
|
# Drift Config
|
||||||
ENV=mainnet-beta
|
ENV=mainnet-beta
|
||||||
ENDPOINT=https://solana-mainnet.rpc.extrnode.com/your-api-key
|
|
||||||
WS_ENDPOINT=wss://solana-mainnet.rpc.extrnode.com/your-api-key
|
|
||||||
KEEPER_PRIVATE_KEY="[123,345,...]"
|
KEEPER_PRIVATE_KEY="[123,345,...]"
|
||||||
|
|
||||||
|
# Hetzner DE
|
||||||
|
ENDPOINT=http://178.63.126.77:8899
|
||||||
|
# OVH FR
|
||||||
|
#ENDPOINT=http://141.95.126.29:8899
|
||||||
|
# Cloudvider GB
|
||||||
|
#ENDPOINT=http://194.127.173.58:8899
|
||||||
|
#CherryServers LT
|
||||||
|
#ENDPOINT=http://84.32.189.122:8099
|
||||||
|
# Teraswitch US
|
||||||
|
#ENDPOINT=http://74.118.139.251:8899
|
||||||
|
# Teraswitch2 US
|
||||||
|
#ENDPOINT=http://74.118.139.68:8899
|
||||||
|
|
||||||
|
|
||||||
|
# ExtrNode
|
||||||
|
#ENDPOINT=https://solana-mainnet.rpc.extrnode.com/your-api-key
|
||||||
|
#WS_ENDPOINT=wss://solana-mainnet.rpc.extrnode.com/your-api-key
|
||||||
|
|
||||||
# Jito Config
|
# Jito Config
|
||||||
# Required if useJito: true is set in config.yaml
|
# Required if useJito: true is set in config.yaml
|
||||||
JITO_BLOCK_ENGINE_URL=frankfurt.mainnet.block-engine.jito.wtf
|
JITO_BLOCK_ENGINE_URL=frankfurt.mainnet.block-engine.jito.wtf
|
||||||
|
|||||||
@@ -149,7 +149,7 @@
|
|||||||
"orientation": "auto",
|
"orientation": "auto",
|
||||||
"reduceOptions": {
|
"reduceOptions": {
|
||||||
"calcs": [
|
"calcs": [
|
||||||
"lastNotNull"
|
"diff"
|
||||||
],
|
],
|
||||||
"fields": "",
|
"fields": "",
|
||||||
"values": false
|
"values": false
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
},
|
},
|
||||||
"disableTextWrap": false,
|
"disableTextWrap": false,
|
||||||
"editorMode": "builder",
|
"editorMode": "builder",
|
||||||
"expr": "delta(total_collateral[24h])",
|
"expr": "total_collateral",
|
||||||
"fullMetaSearch": false,
|
"fullMetaSearch": false,
|
||||||
"includeNullMetadata": true,
|
"includeNullMetadata": true,
|
||||||
"instant": false,
|
"instant": false,
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
"useBackend": false
|
"useBackend": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Profit 24h",
|
"title": "PNL",
|
||||||
"type": "stat"
|
"type": "stat"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
"mode": "scheme",
|
"mode": "scheme",
|
||||||
"reverse": false,
|
"reverse": false,
|
||||||
"scale": "exponential",
|
"scale": "exponential",
|
||||||
"scheme": "Turbo",
|
"scheme": "Viridis",
|
||||||
"steps": 64
|
"steps": 64
|
||||||
},
|
},
|
||||||
"exemplars": {
|
"exemplars": {
|
||||||
@@ -436,7 +436,7 @@
|
|||||||
"calcs": [],
|
"calcs": [],
|
||||||
"displayMode": "list",
|
"displayMode": "list",
|
||||||
"placement": "bottom",
|
"placement": "bottom",
|
||||||
"showLegend": true
|
"showLegend": false
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "single",
|
"mode": "single",
|
||||||
@@ -538,7 +538,7 @@
|
|||||||
"calcs": [],
|
"calcs": [],
|
||||||
"displayMode": "list",
|
"displayMode": "list",
|
||||||
"placement": "bottom",
|
"placement": "bottom",
|
||||||
"showLegend": true
|
"showLegend": false
|
||||||
},
|
},
|
||||||
"tooltip": {
|
"tooltip": {
|
||||||
"mode": "single",
|
"mode": "single",
|
||||||
@@ -957,6 +957,6 @@
|
|||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "Drift Keeper",
|
"title": "Drift Keeper",
|
||||||
"uid": "f4c3a630-ffd0-41c8-a36a-52e0771b77fb",
|
"uid": "f4c3a630-ffd0-41c8-a36a-52e0771b77fb",
|
||||||
"version": 7,
|
"version": 6,
|
||||||
"weekStart": ""
|
"weekStart": ""
|
||||||
}
|
}
|
||||||
@@ -7,3 +7,7 @@ datasources:
|
|||||||
isDefault: true
|
isDefault: true
|
||||||
access: proxy
|
access: proxy
|
||||||
editable: true
|
editable: true
|
||||||
|
basicAuth: true
|
||||||
|
basicAuthUser: prom
|
||||||
|
secureJsonData:
|
||||||
|
basicAuthPassword: prompass
|
||||||
@@ -10,15 +10,6 @@ alerting:
|
|||||||
timeout: 10s
|
timeout: 10s
|
||||||
api_version: v1
|
api_version: v1
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: prometheus
|
|
||||||
honor_timestamps: true
|
|
||||||
scrape_interval: 15s
|
|
||||||
scrape_timeout: 10s
|
|
||||||
metrics_path: /metrics
|
|
||||||
scheme: http
|
|
||||||
static_configs:
|
|
||||||
- targets:
|
|
||||||
- localhost:9090
|
|
||||||
- job_name: keeper
|
- job_name: keeper
|
||||||
honor_timestamps: true
|
honor_timestamps: true
|
||||||
scrape_interval: 15s
|
scrape_interval: 15s
|
||||||
|
|||||||
2
prometheus/web.yml
Normal file
2
prometheus/web.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
basic_auth_users:
|
||||||
|
prom: $2y$10$oWtHm79bh0D1CnNC4brGiOU7y6MbYa6cgklF/g6ek9YZYkgXfeOIu
|
||||||
Reference in New Issue
Block a user