From 5a12c97a09285fe6bb01e7e9741ad2a3b58d8953 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Tue, 21 May 2024 21:49:08 +0530 Subject: [PATCH] staging config --- fly.staging.toml | 100 ++++++++++++++++++++++++++--------------------- src/config.ts | 2 +- 2 files changed, 57 insertions(+), 45 deletions(-) diff --git a/fly.staging.toml b/fly.staging.toml index 92aa7d2d..5b10d799 100644 --- a/fly.staging.toml +++ b/fly.staging.toml @@ -1,54 +1,66 @@ -app = "indexer-staging" -primary_region = "den" -kill_signal = "SIGINT" -kill_timeout = 5 +# fly.toml app configuration file generated for indexer-v2-staging on 2024-05-21T18:42:41+05:30 +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'indexer-v2-staging' +primary_region = 'den' +kill_signal = 'SIGINT' +kill_timeout = '5s' [experimental] auto_rollback = true +[build] + +[deploy] + wait_timeout = '6h0m0s' + [env] - PORT = "8080" - DEPLOYMENT_ENVIRONMENT = "staging" - LOG_LEVEL = "debug" - STORAGE_DIR = "/mnt/indexer" - INDEXED_CHAINS = "mainnet,optimism,fantom,pgn-testnet,pgn-mainnet,arbitrum,polygon,sepolia,avalanche,avalanche-fuji,scroll,scroll-sepolia,base,zksync-era-mainnet,sei-devnet,lukso-mainnet,lukso-testnet,celo-mainnet,celo-testnet" - ENABLE_RESOURCE_MONITOR = "true" - NODE_OPTIONS="--max-old-space-size=7168" + DEPLOYMENT_ENVIRONMENT = 'production' + ENABLE_RESOURCE_MONITOR = 'false' + ESTIMATES_LINEARQF_WORKER_POOL_SIZE = '10' + INDEXED_CHAINS = 'sepolia' + LOG_LEVEL = 'debug' + NODE_OPTIONS = '--max-old-space-size=4096' + PASSPORT_SCORER_ID = '335' + PINO_PRETTY = 'true' + PORT = '8080' + STORAGE_DIR = '/mnt/indexer' [processes] - web = "npm start -- --indexer --http" + indexer = 'npm start -- --indexer --http' + web = 'npm start -- --http --http-wait-for-sync=false' -[mounts] - source="indexer_staging" - destination="/mnt/indexer" +[[mounts]] + source = 'indexer_staging' + destination = '/mnt/indexer' + initial_size = '50gb' + processes = ['indexer', 'web'] -[[services]] - protocol = "tcp" +[http_service] internal_port = 8080 - processes = ["web"] - - [[services.ports]] - port = 80 - handlers = ["http"] - force_https = true - [[services.ports]] - port = 443 - handlers = ["tls", "http"] - - [services.concurrency] - type = "connections" - hard_limit = 25 - soft_limit = 20 - - [[services.tcp_checks]] - interval = "30s" - timeout = "10s" - grace_period = "1m" - - [[services.http_checks]] - interval = "60s" - grace_period = "1m" - timeout = "5s" - method = "get" - path = "/api/v1/status" - protocol = "http" + force_https = true + auto_stop_machines = true + auto_start_machines = true + min_machines_running = 2 + processes = ['web'] + + [http_service.concurrency] + type = 'requests' + hard_limit = 250 + soft_limit = 200 + +[checks] + [checks.http] + port = 8080 + type = 'http' + interval = '15s' + timeout = '10s' + grace_period = '30s' + method = 'get' + path = '/api/v1/status' + processes = ['web', 'indexer'] + +[[vm]] + size = 'performance-2x' diff --git a/src/config.ts b/src/config.ts index 4a11c4f8..fa85b47f 100644 --- a/src/config.ts +++ b/src/config.ts @@ -140,7 +140,7 @@ const CHAINS: Chain[] = [ id: 10, name: "optimism", rpc: rpcUrl - .default("https://opt-mainnet.g.alchemy.com/v2/") + .default("https://optimism-rpc.publicnode.com") .parse(process.env.OPTIMISM_RPC_URL), pricesFromTimestamp: Date.UTC(2022, 11, 1, 0, 0, 0), tokens: [