global:
  env: main
# enable Blockscout deploy
blockscout:
  app: blockscout
  enabled: true
  image:
    _default: &image blockscout/blockscout:frontend-main
  replicas:
    app: 1
  docker:
    port: 80
    targetPort: 4000
  # init container
  init:
    enabled: true
    image:
      _default: *image
  # enable ingress
  ingress:
    enabled: true
    annotations:
      # - 'nginx.ingress.kubernetes.io/rewrite-target: /$2'
      - 'nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.blockscout-main.test.aws-k8s.blockscout.com, https://*.test.aws-k8s.blockscout.com, http://localhost:3000"'
      - 'nginx.ingress.kubernetes.io/cors-allow-credentials: "true"'
      - 'nginx.ingress.kubernetes.io/cors-allow-methods: PUT, GET, POST, OPTIONS, DELETE, PATCH'
      - 'nginx.ingress.kubernetes.io/enable-cors: "true"'
      - 'nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,x-csrf-token"'
      - 'nginx.ingress.kubernetes.io/cors-expose-headers: "x-bs-account-csrf"'
    host:
      _default: blockscout.test.blockscout.aws-k8s.blockscout.com
    # enable https
    #
    tls:
      enabled: true
    path:
      prefix:
        # - "/poa/sokol(/|$)(.*)"
        - "/"
  # probes
  livenessProbe:
    enabled: true
    path: /
  readinessProbe:
    enabled: true
    path: /
  resources:
    limits:
      memory:
        _default: "4Gi"
      cpu:
        _default: "3"
    requests:
      memory:
        _default: "2Gi"
      cpu:
        _default: "2"
  # node label
  nodeSelector:
    enabled: true
    labels:
      _default:
        app: blockscout-prod
  # Blockscout environment variables
  environment:
    BLOCKSCOUT_VERSION:
      _default: v5.1.2-beta
    ECTO_USE_SSL:
      _default: 'false'
    ETHEREUM_JSONRPC_VARIANT:
      _default: geth
    HEART_BEAT_TIMEOUT:
      _default: 30
    PORT:
      _default: 4000
    SUBNETWORK:
      _default: Ethereum
    NETWORK:
      _default: (Goerli)
    NETWORK_ICON:
      _default: _network_icon.html
    COIN:
      _default: ETH
    COIN_NAME:
      _default: ETH
    LOGO:
      _default: /images/goerli_logo.svg
    TXS_STATS_DAYS_TO_COMPILE_AT_INIT:
      _default: 1
    COIN_BALANCE_HISTORY_DAYS:
      _default: 90
    POOL_SIZE:
      _default: 100
    DISPLAY_TOKEN_ICONS:
      _default: 'true'
    FETCH_REWARDS_WAY:
      _default: manual
    SHOW_TESTNET_LABEL:
      _default: 'true'
    CHAIN_ID:
      _default: 5
    MICROSERVICE_SC_VERIFIER_ENABLED:
      _default: 'true'
    MICROSERVICE_SC_VERIFIER_URL:
      _default: http://eth-bytecode-db-svc.eth-bytecode-db-testing.svc.cluster.local:80
    INDEXER_MEMORY_LIMIT:
      _default: 5
    ACCOUNT_ENABLED:
      _default: 'true'
    API_V2_ENABLED:
      _default: 'true'
    APPS_MENU:
      _default: 'true'
    APPS:
      _default: '[{"title": "Marketplace", "url": "/apps", "embedded?": true}]'
    SESSION_COOKIE_DOMAIN:
      _default: blockscout-main.test.aws-k8s.blockscout.com
    ETHEREUM_JSONRPC_DEBUG_TRACE_TRANSACTION_TIMEOUT:
      _default: '20s'
    INDEXER_INTERNAL_TRANSACTIONS_BATCH_SIZE:
      _default: 15
    INDEXER_DISABLE_EMPTY_BLOCKS_SANITIZER:
      _default: 'true'
    INDEXER_DISABLE_PENDING_TRANSACTIONS_FETCHER:
      _default: 'true'
    INDEXER_RECEIPTS_BATCH_SIZE:
      _default: 50
    INDEXER_COIN_BALANCES_BATCH_SIZE:
      _default: 50
    DISABLE_EXCHANGE_RATES:
      _default: 'true'
    DISABLE_INDEXER:
      _default: 'false'
    FIRST_BLOCK:
      _default: '8739119'
    LAST_BLOCK:
      _default: '8739119'
    TRACE_FIRST_BLOCK:
      _default: '8739119'
    TRACE_LAST_BLOCK:
      _default: '8739119'

postgres:
  enabled: true
  image: postgres:13.8
  port: 5432

  command: '["docker-entrypoint.sh", "-c"]'
  args: '["max_connections=500"]'

  # strategy: Recreate

  persistence: true
  customShm:
    enabled: true
    sizeLimit: 256Mi

  storage: 1400Gi

  resources:
    limits:
      memory:
        _default: "8Gi"
      cpu:
        _default: "2"
    requests:
      memory:
        _default: "8Gi"
      cpu:
        _default: "1"
  # node label
  nodeSelector:
    enabled: true
    labels:
      _default:
        app: blockscout-prod

  environment:
    POSTGRES_USER:
      _default: 'postgres'
    POSTGRES_HOST_AUTH_METHOD:
      _default: 'trust'
# enable geth deploy
geth:
  enabled: false
  image:
    _default: ethereum/client-go:stable
  replicas:
    app: 1
  ports:
    http:
      number: 8545
      protocol: TCP
    ws:
      number: 8546
      protocol: TCP
    auth:
      number: 8551
      protocol: TCP
  command:
    - /bin/sh
    - -c
    - |-
      /root/init.sh --fakepow --dev --dev.period=1 --datadir=/root/.ethereum/devnet --keystore=/root/.ethereum/devnet/keystore --password=/root/password.txt --unlock=0 --unlock=1 --mine --miner.threads=1 --miner.etherbase=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 --ipcpath=/root/geth.ipc --http --http.vhosts=* --http.addr=0.0.0.0 --http.port=8545 --http.api=eth,net,web3,debug,txpool --ws --ws.origins=* --ws.addr=0.0.0.0 --ws.port=8546 --ws.api=eth,net,web3,debug,txpool --graphql --graphql.corsdomain=* --allow-insecure-unlock --rpc.allow-unprotected-txs --http.corsdomain=* --vmdebug --networkid=1337 --rpc.txfeecap=0
  environment: {}
  persistence:
    enabled: false
  resources:
    limits:
      memory:
        _default: "2Gi"
      cpu:
        _default: "0.2"
    requests:
      memory:
        _default: "2Gi"
      cpu:
        _default: "0.2"
  # node label
  nodeSelector:
    enabled: true
    app: blockscout
  service:
    # ClusterIP, NodePort or LoadBalancer
    type: ClusterIP
  # enable ingress
  ingress:
    enabled: true
    host:
      _default: node.test.aws-k8s.blockscout.com
    # enable https
    tls:
      enabled: false
  jwt:
    enabled: false
  files:
    enabled: true

frontend:
  app: blockscout
  enabled: true
  image:
    _default: ghcr.io/blockscout/frontend:main
  replicas:
    app: 1
  docker:
    port: 80
    targetPort: 3000
  ingress:
    enabled: true
    # annotations:
    #   - 'nginx.ingress.kubernetes.io/use-regex: "true"'
    host:
      _default: frontend.test.blockscout.aws-k8s.blockscout.com
    # enable https
    tls:
      enabled: true
    path:
      exact:
        # - "/(apps|auth/profile|account)"
        - "/"
      prefix:
        - "/_next"
        - "/node-api"
        - "/account"
        - "/apps"
        - "/static"
        - "/auth/profile"
        - "/txs"
        - "/tx"
        - "/blocks"
        - "/block"
        - "/login"
        - "/address"
        - "/stats"
        - "/search-results"
        - "/token"
        - "/tokens"
        - "/accounts"
        - "/visualize"
        - "/api-docs"
        - "/csv-export"
        - "/verified-contracts"
        - "/graphiql"

  resources:
    limits:
      memory:
        _default: 768Mi
      cpu:
        _default: 500m
    requests:
      memory:
        _default: 384Mi
      cpu:
        _default: 250m
  environment:
    # ui config
    NEXT_PUBLIC_FEATURED_NETWORKS:
      _default: https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/featured-networks/eth-goerli.json
    NEXT_PUBLIC_NETWORK_EXPLORERS:
      _default: "[{'title':'Anyblock','baseUrl':'https://explorer.anyblock.tools','paths':{'tx':'/ethereum/ethereum/goerli/transaction','address':'/ethereum/ethereum/goerli/address'}},{'title':'Etherscan','baseUrl':'https://goerli.etherscan.io/','paths':{'tx':'/tx','address':'/address'}}]"
    # network config
    NEXT_PUBLIC_NETWORK_NAME:
      _default: Ethereum
    NEXT_PUBLIC_NETWORK_SHORT_NAME:
      _default: Goerli
    NEXT_PUBLIC_NETWORK_ASSETS_PATHNAME:
      _default: ethereum
    NEXT_PUBLIC_NETWORK_LOGO:
      _default: https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-logos/goerli.svg
    NEXT_PUBLIC_NETWORK_ICON:
      _default: https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/network-icons/goerli.svg
    NEXT_PUBLIC_NETWORK_ID:
      _default: 5
    NEXT_PUBLIC_NETWORK_CURRENCY_NAME:
      _default: Ether
    NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL:
      _default: ETH
    NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS:
      _default: 18
    NEXT_PUBLIC_NETWORK_TOKEN_ADDRESS:
      _default: 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
    NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED:
      _default: true
    NEXT_PUBLIC_NETWORK_VERIFICATION_TYPE:
      _default: validation
    NEXT_PUBLIC_MARKETPLACE_SUBMIT_FORM:
      _default: https://airtable.com/shrqUAcjgGJ4jU88C
    # api config
    NEXT_PUBLIC_API_BASE_PATH:
      _default: /
    NEXT_PUBLIC_BLOCKSCOUT_VERSION:
      _default: v5.1.2-beta
    NEXT_PUBLIC_FOOTER_GITHUB_LINK:
      _default: https://github.com/blockscout/blockscout
    NEXT_PUBLIC_FOOTER_TWITTER_LINK:
      _default: https://www.twitter.com/blockscoutcom
    NEXT_PUBLIC_APP_ENV:
      _default: stable
    NEXT_PUBLIC_APP_INSTANCE:
      _default: eth_goerli
    NEXT_PUBLIC_API_HOST:
      _default: blockscout.com/eth/goerli
    NEXT_PUBLIC_STATS_API_HOST:
      _default: https://stats-test.aws-k8s.blockscout.com/
    NEXT_PUBLIC_VISUALIZE_API_HOST:
      _default: https://visualizer.aws-k8s.blockscout.com
    NEXT_PUBLIC_APP_HOST:
      _default: blockscout.com/eth/goerli
    NEXT_PUBLIC_LOGOUT_URL:
      _default: https://blockscoutcom.us.auth0.com/v2/logout
    NEXT_PUBLIC_LOGOUT_RETURN_URL:
      _default: https://blockscout.com/auth/logout
    NEXT_PUBLIC_NETWORK_RPC_URL:
      _default: https://rpc.ankr.com/eth_goerli
    NEXT_PUBLIC_HOMEPAGE_CHARTS:
      _default: "['daily_txs','coin_price','market_cup']"
    NEXT_PUBLIC_API_SPEC_URL:
      _default: https://raw.githubusercontent.com/blockscout/blockscout-api-v2-swagger/main/swagger.yaml
    NEXT_PUBLIC_MARKETPLACE_CONFIG_URL:
      _default: https://raw.githubusercontent.com/blockscout/frontend-configs/dev/configs/marketplace/eth-goerli.json
    NEXT_PUBLIC_IS_TESTNET:
      _default: true
    NEXT_PUBLIC_GRAPHIQL_TRANSACTION:
      _default: 0xf7d4972356e6ae44ae948d0cf19ef2beaf0e574c180997e969a2837da15e349d
