Skip to content
Snippets Groups Projects
Commit 1560e46e authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

easier connection to remote node

parent a0e81190
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,19 @@ Duniter Datapod is designed for offchain storage of Ğ1 data but does not depend
## Use
TODO use in prod with docker
To start a full indexer in production mode with docker, use the [`docker-compose.prod.yml`](./docker-compose.prod.yml) file:
```sh
# start
docker compose up -d
```
This will pull preconfigured images for postgres/hasura, kubo and datapod. This should:
- connect to existing network
- start collecting from default IPNS
- index to database
You can then do a simple proxy_pass to `HASURA_LISTEN_PORT` and `KUBO_GATEWAY_PORT`.
## Dev
......
#!/bin/sh
set -ex
# --- bootstrap ---
# remove default bootstrap nodes
ipfs bootstrap rm all
# add custom bootstrap
ipfs config Bootstrap --json '["/dns/datapod.coinduf.eu/tcp/4001/p2p/12D3KooWFp4JsoDo5FX8CFLtyJjaWWRZ8q3gr8uT2s9To2GYzRNA"]'
# --- rpc ---
# allow easy access through ssh tunnel on port 5002
# ipfs --api=/ip4/127.0.0.1/tcp/5002
ipfs config API.HTTPHeaders.Access-Control-Allow-Origin --json '["http://127.0.0.1:5002"]'
ipfs config API.HTTPHeaders.Access-Control-Allow-Methods --json '["PUT", "POST"]'
# --- gateway ---
# prevent gateway from fetching foreign data
ipfs config Gateway.NoFetch --json true
# only reprovide pinned data
ipfs config Reprovider.Strategy "pinned"
# allow to expose hostname
ipfs config Gateway.PublicGateways --json "{\"$KUBO_GATEWAY_DOMAIN\":{\"UseSubdomains\": true,\"Paths\":[\"/ipfs\"]}}"
ipfs config Gateway.PublicGateways --json "{\"$KUBO_GATEWAY_DOMAIN\":{\"UseSubdomains\": false,\"Paths\":[\"/ipfs\"]}}"
# only reprovide pinned data
ipfs config Reprovider.Strategy "pinned"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment