mirror of
https://github.com/luxfi/monitoring.git
synced 2026-10-30 15:24:48 +00:00
/ext/ is gone from api.lux.network, api.zoo.network and api.hanzo.network (all 404 today), so every published /ext/ URL was already broken. Convert to the one canonical path and fix the URL forms that were dead for other reasons at the same time: /mainnet|/testnet|/devnet path prefix -> the per-network host (404 today) api.testnet.lux.network, testnet-api.lux.network -> api.lux-test.network /ext/C/rpc (missing bc/) -> /v1/bc/C/rpc chain aliases + blockchain IDs under api.lux.network -> the L1s own host Third-party RPC hosts (Avalanche, Flare, blastapi) are left untouched. Co-authored-by: Hanzo Dev <[email protected]>
206 lines
6.3 KiB
YAML
206 lines
6.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Lux Network Node
|
|
luxd:
|
|
image: ubuntu:22.04
|
|
container_name: lux-node
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9630:9630" # RPC
|
|
- "9631:9631" # Staking
|
|
- "8546:8546" # WebSocket port
|
|
volumes:
|
|
- /home/z/work/lux/node/build/luxd:/usr/local/bin/luxd:ro
|
|
- /home/z/work/lux/run-lux-mainnet-automining.sh:/run-node.sh:ro
|
|
- luxd_data:/data
|
|
- /home/z/archived/backups/2024-original/luxnet/genesis.json:/genesis.json:ro
|
|
- /home/z/.luxd/chainData/lux-mainnet-import/db:/import-data:ro
|
|
environment:
|
|
- DATA_DIR=/data
|
|
- GENESIS_FILE=/genesis.json
|
|
- IMPORT_PATH=/import-data
|
|
command: >
|
|
bash -c "
|
|
apt-get update && apt-get install -y openssl curl jq &&
|
|
mkdir -p /data/{staking,configs/chains/C,db} &&
|
|
cd /data/staking &&
|
|
openssl genrsa -out staker.key 4096 2>/dev/null &&
|
|
openssl req -new -x509 -key staker.key -out staker.crt -days 365 -subj '/C=US/ST=NY/O=Lux/CN=luxd' 2>/dev/null &&
|
|
cp /genesis.json /data/configs/chains/C/genesis.json &&
|
|
echo '{
|
|
\"snowman-api-enabled\": false,
|
|
\"eth-apis\": [\"eth\",\"eth-filter\",\"net\",\"web3\",\"internal-eth\",\"internal-blockchain\",\"internal-debug\",\"personal\",\"admin\",\"miner\"],
|
|
\"personal-api-enabled\": true,
|
|
\"import-chain-data\": \"'"$IMPORT_PATH"'\",
|
|
\"database-backend\": \"pebbledb\",
|
|
\"local-txs-enabled\": true,
|
|
\"api-max-duration\": 0,
|
|
\"ws-enabled\": true,
|
|
\"ws-port\": 8546,
|
|
\"allow-unfinalized-queries\": true,
|
|
\"log-level\": \"info\",
|
|
\"state-sync-enabled\": false,
|
|
\"pruning-enabled\": false,
|
|
\"enable-automining\": true,
|
|
\"automining-interval\": \"2s\",
|
|
\"rpc-gas-cap\": 0,
|
|
\"rpc-tx-fee-cap\": 0
|
|
}' > /data/configs/chains/C/config.json &&
|
|
exec /usr/local/bin/luxd \
|
|
--data-dir=/data \
|
|
--network-id=96369 \
|
|
--http-port=9630 \
|
|
--staking-port=9631 \
|
|
--http-host=0.0.0.0 \
|
|
--public-ip=127.0.0.1 \
|
|
--staking-enabled=false \
|
|
--sybil-protection-enabled=false \
|
|
--snow-sample-size=1 \
|
|
--snow-quorum-size=1 \
|
|
--log-level=info
|
|
"
|
|
networks:
|
|
- lux-monitoring
|
|
- hanzo-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:9630/v1/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 60s
|
|
# Prometheus - Time series database for metrics
|
|
prometheus:
|
|
image: prom/prometheus:latest
|
|
container_name: lux-prometheus
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9090:9090"
|
|
volumes:
|
|
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus_data:/prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
- '--storage.tsdb.path=/prometheus'
|
|
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
|
- '--web.console.templates=/usr/share/prometheus/consoles'
|
|
- '--web.enable-lifecycle'
|
|
- '--storage.tsdb.retention.time=30d'
|
|
networks:
|
|
- lux-monitoring
|
|
- hanzo-network
|
|
|
|
# Grafana - Visualization and dashboards
|
|
grafana:
|
|
image: grafana/grafana:latest
|
|
container_name: lux-grafana
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3100:3000" # Using 3100 to avoid conflict with explorers
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=admin
|
|
- GF_SECURITY_ADMIN_PASSWORD=luxnetwork
|
|
- GF_USERS_ALLOW_SIGN_UP=false
|
|
- GF_SERVER_ROOT_URL=https://grafana.lux.network
|
|
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource
|
|
volumes:
|
|
- grafana_data:/var/lib/grafana
|
|
- ./grafana/provisioning:/etc/grafana/provisioning:ro
|
|
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
|
|
depends_on:
|
|
- prometheus
|
|
- loki
|
|
- luxd
|
|
networks:
|
|
- lux-monitoring
|
|
|
|
# Loki - Log aggregation
|
|
loki:
|
|
image: grafana/loki:latest
|
|
container_name: lux-loki
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3101:3100"
|
|
volumes:
|
|
- ./loki/loki-config.yml:/etc/loki/local-config.yaml:ro
|
|
- loki_data:/loki
|
|
command: -config.file=/etc/loki/local-config.yaml
|
|
networks:
|
|
- lux-monitoring
|
|
|
|
# Promtail - Log collector for Loki
|
|
promtail:
|
|
image: grafana/promtail:latest
|
|
container_name: lux-promtail
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /var/log:/var/log:ro
|
|
- /home/z/.lux/runs:/lux-logs:ro
|
|
- ./promtail/promtail-config.yml:/etc/promtail/config.yml:ro
|
|
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
command: -config.file=/etc/promtail/config.yml
|
|
depends_on:
|
|
- loki
|
|
networks:
|
|
- lux-monitoring
|
|
|
|
# Node Exporter - System metrics
|
|
node-exporter:
|
|
image: prom/node-exporter:latest
|
|
container_name: lux-node-exporter
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9100:9100"
|
|
volumes:
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /:/rootfs:ro
|
|
command:
|
|
- '--path.procfs=/host/proc'
|
|
- '--path.sysfs=/host/sys'
|
|
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
|
networks:
|
|
- lux-monitoring
|
|
|
|
# Postgres Exporter - Database metrics
|
|
postgres-exporter:
|
|
image: prometheuscommunity/postgres-exporter:latest
|
|
container_name: lux-postgres-exporter
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9187:9187"
|
|
environment:
|
|
DATA_SOURCE_NAME: "postgresql://blockscout:blockscout@lux-postgres:5432/explorer_luxnet?sslmode=disable"
|
|
networks:
|
|
- lux-monitoring
|
|
- hanzo-network
|
|
|
|
# Alertmanager - Alert handling
|
|
alertmanager:
|
|
image: prom/alertmanager:latest
|
|
container_name: lux-alertmanager
|
|
restart: unless-stopped
|
|
ports:
|
|
- "9093:9093"
|
|
volumes:
|
|
- ./alertmanager/alertmanager.yml:/etc/alertmanager/alertmanager.yml:ro
|
|
- alertmanager_data:/alertmanager
|
|
command:
|
|
- '--config.file=/etc/alertmanager/alertmanager.yml'
|
|
- '--storage.path=/alertmanager'
|
|
networks:
|
|
- lux-monitoring
|
|
|
|
volumes:
|
|
prometheus_data:
|
|
grafana_data:
|
|
loki_data:
|
|
alertmanager_data:
|
|
luxd_data:
|
|
|
|
networks:
|
|
lux-monitoring:
|
|
driver: bridge
|
|
hanzo-network:
|
|
external: true |