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

wip autoconfigure kubo

parent 13b2a19b
No related branches found
No related tags found
No related merge requests found
# === IPFS ===
KUBO_RPC="http://127.0.0.1:5001"
KUBO_GATEWAY_PORT=8080
KUBO_GATEWAY_DOMAIN="localhost"
# === POSTGRES ===
DB_HOST=localhost
......
FROM ipfs/kubo:v0.28.0
COPY ./scripts/remove-default-bootstrap.sh /container-init.d/001-remove-default-bootstrap.sh
COPY ./scripts/configure.sh /container-init.d/001-configure.sh
CMD ["daemon", "--enable-pubsub-experiment"]
# docker buildx build -f Dockerfile.Kubo . -t h30x/datapod-kubo
# docker image push h30x/datapod-kubo
\ No newline at end of file
......@@ -40,14 +40,13 @@ services:
- 4001:4001
- 4001:4001/udp
# public gateway
- 8080:8080
- ${KUBO_GATEWAY_PORT:-8080}:8080
# expose RPC locally to allow access with ssh tunnel
- 127.0.0.1:5001:5001
volumes:
- kubo_data:/data/ipfs
healthcheck:
test: ['CMD', 'ipfs', 'diag', 'cmds']
interval: 1s
environment:
KUBO_GATEWAY_DOMAIN: "gateway.datapod.coinduf.eu"
restart: always
# ------
......
#!/bin/sh
set -ex
# remove default bootstrap nodes
ipfs bootstrap rm all
# 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\"]}}"
#!/bin/sh
set -ex
ipfs bootstrap rm all
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment