Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ckb-indexer with docker #34

Closed
HFFP opened this issue Jul 14, 2021 · 6 comments
Closed

ckb-indexer with docker #34

HFFP opened this issue Jul 14, 2021 · 6 comments

Comments

@HFFP
Copy link

HFFP commented Jul 14, 2021

i find ckb-indexer in docker hub, https://hub.docker.com/r/nervos/ckb-indexer

but when i request node rpc i got result, but when i use indexer rpc i got 502 error.

so, have some special params i did't set? or some else?

i just run this command

docker run -d -it -p 8117:9115 --name=ckb-testnet-indexer -e "CKB_NETWORK=testnet" -v "$PWD/data":/data nervos/ckb-indexer:v0.37.0

@quake
Copy link
Member

quake commented Jul 14, 2021

Which RPC are you calling? btw, this docker is packed with old version ckb-indexer, we will upload a new version later.

@HFFP
Copy link
Author

HFFP commented Jul 14, 2021

I saw the update, so I also need to run a ckb node?

@quake
Copy link
Member

quake commented Jul 14, 2021

yes, ckb-indexer will connect to ckb node's default rpc uri at http://127.0.0.1:8114

@HFFP
Copy link
Author

HFFP commented Jul 14, 2021

yes, ckb-indexer will connect to ckb node's default rpc uri at http://127.0.0.1:8114

ok. thank you!

@HFFP HFFP closed this as completed Jul 14, 2021
@HFFP HFFP reopened this Jul 14, 2021
@HFFP
Copy link
Author

HFFP commented Jul 14, 2021

not found image

@HFFP
Copy link
Author

HFFP commented Jul 14, 2021

version: "3"

services:
  ckb:
      image: nervos/ckb
      container_name: ckb-testnet-node
      command: run
      environment:
        - CKB_CHAIN=testnet
      volumes:
        - ckb-testnet:/var/lib/ckb
      ports:
      - 8114:8114

  ckb-indexer:
      image: tockb/ckb-indexer
      container_name: ckb-testnet-indexer
      ports:
      - 8116:8116
      volumes:
        - ckb-testnet-indexer:/data
      command: ckb-indexer -s /data -c http://ckb:8114 -l 0.0.0.0:8116
      depends_on:
        - ckb

volumes:
ckb-testnet:
ckb-testnet-indexer:

if anyone has the same problem, I use docker-compose as above to solve

@HFFP HFFP closed this as completed Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants