

services:
  core-buffalo-archive:
    image: ghcr.io/coredao-org/core-chain:1.0.15    
    sysctls:
      net.ipv4.tcp_slow_start_after_idle: 0
      net.ipv4.tcp_no_metrics_save: 1
    user: root
    ports:
      - "10564:10564"
      - "10564:10564/udp"
    expose:                                                                              
      - "8545"                                                                           
    volumes:                                                                             
      - core-buffalo-core-archive-leveldb-hash:/core/.ethereum
      - /slowdisk:/slowdisk
      - ./core-chain/testnet:/config      
    entrypoint: [ "geth" ]
    command:
      - --buffalo
      - --config=/config/config.toml
      - --db.engine=leveldb
      - --state.scheme=hash
      - --syncmode=full
      - --gcmode=archive
      - --rpc.gascap=600000000
      - --nat=extip:${IP}
      - --http
      - --http.addr=0.0.0.0
      - --http.port=8545
      - --http.vhosts=*
      - --http.api=eth,net,web3,txpool,debug,admin,satoshi
      - --ws
      - --ws.addr=0.0.0.0
      - --ws.port=8545
      - --ws.origins=*
      - --ws.api=net,web3,eth,debug
      - --maxpeers=200
      - --nodiscover=false
      - --discovery.port=10564     
      - --port=10564
      
      
    restart: unless-stopped
    stop_grace_period: 3m
    networks: 
      - chains
    labels:                                                                              
      - "traefik.enable=true"                                                            
      - "traefik.http.middlewares.core-buffalo-core-archive-leveldb-hash-stripprefix.stripprefix.prefixes=/core-buffalo-archive"             
      - "traefik.http.services.core-buffalo-core-archive-leveldb-hash.loadbalancer.server.port=8545"                        
      - "traefik.http.routers.core-buffalo-core-archive-leveldb-hash.entrypoints=websecure"                                 
      - "traefik.http.routers.core-buffalo-core-archive-leveldb-hash.tls.certresolver=myresolver"                           
      - "traefik.http.routers.core-buffalo-core-archive-leveldb-hash.rule=Host(`$DOMAIN`) && PathPrefix(`/core-buffalo-archive`)"            
      - "traefik.http.routers.core-buffalo-core-archive-leveldb-hash.middlewares=core-buffalo-core-archive-leveldb-hash-stripprefix, ipwhitelist"

volumes:
  core-buffalo-core-archive-leveldb-hash:
