Skip to content

Commit

Permalink
ipfs + binder: run a local node within binder and configure peering
Browse files Browse the repository at this point in the history
  • Loading branch information
d70-t committed Nov 25, 2021
1 parent 5fa3bb8 commit 34cd44b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
7 changes: 7 additions & 0 deletions postBuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

IPFS_VERSION=0.10.0

wget https://dist.ipfs.io/go-ipfs/v${IPFS_VERSION}/go-ipfs_v${IPFS_VERSION}_linux-amd64.tar.gz
tar -xvzf go-ipfs_v${IPFS_VERSION}_linux-amd64.tar.gz
rm go-ipfs_v${IPFS_VERSION}_linux-amd64.tar.gz
12 changes: 11 additions & 1 deletion start
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash

export IPFSSPEC_GATEWAYS="https://tempgw01.web3.storage https://ipfs.io https://dweb.link https://cloudflare-ipfs.com/"
# make ipfs command available
export PATH=$PATH:$HOME/go-ipfs
# set up local node
ipfs init

# configure peering with known peers
ipfs config --json Peering "`curl -L https://github.com/eurec4a/ipfs_tools/raw/main/peers.json`"

# start the daemon
ipfs daemon 2>ipfs.log | grep -i -o -m1 'Daemon is ready' & tail -f --pid=$! ipfs.log

# continue starting the jupyter server
exec "$@"

0 comments on commit 34cd44b

Please sign in to comment.