forked from eurec4a/how_to_eurec4a
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipfs + binder: run a local node within binder and configure peering
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "$@" |