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

wip autoconfigure kubo

parent 13b2a19b
Branches
Tags
No related merge requests found
# === IPFS === # === IPFS ===
KUBO_RPC="http://127.0.0.1:5001" KUBO_RPC="http://127.0.0.1:5001"
KUBO_GATEWAY_PORT=8080
KUBO_GATEWAY_DOMAIN="localhost"
# === POSTGRES === # === POSTGRES ===
DB_HOST=localhost DB_HOST=localhost
......
FROM ipfs/kubo:v0.28.0 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"] CMD ["daemon", "--enable-pubsub-experiment"]
# docker buildx build -f Dockerfile.Kubo . -t h30x/datapod-kubo # docker buildx build -f Dockerfile.Kubo . -t h30x/datapod-kubo
# docker image push h30x/datapod-kubo # docker image push h30x/datapod-kubo
\ No newline at end of file
...@@ -40,14 +40,13 @@ services: ...@@ -40,14 +40,13 @@ services:
- 4001:4001 - 4001:4001
- 4001:4001/udp - 4001:4001/udp
# public gateway # public gateway
- 8080:8080 - ${KUBO_GATEWAY_PORT:-8080}:8080
# expose RPC locally to allow access with ssh tunnel # expose RPC locally to allow access with ssh tunnel
- 127.0.0.1:5001:5001 - 127.0.0.1:5001:5001
volumes: volumes:
- kubo_data:/data/ipfs - kubo_data:/data/ipfs
healthcheck: environment:
test: ['CMD', 'ipfs', 'diag', 'cmds'] KUBO_GATEWAY_DOMAIN: "gateway.datapod.coinduf.eu"
interval: 1s
restart: always 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