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

add subdomain gateway

and volume for easier config
parent 1560e46e
No related branches found
No related tags found
No related merge requests found
...@@ -45,8 +45,10 @@ services: ...@@ -45,8 +45,10 @@ services:
- 127.0.0.1:5001:5001 - 127.0.0.1:5001:5001
volumes: volumes:
- kubo_data:/data/ipfs - kubo_data:/data/ipfs
- kubo_init:/container-init.d
environment: environment:
KUBO_GATEWAY_DOMAIN: "gateway.datapod.coinduf.eu" KUBO_GATEWAY_DOMAIN: "gateway.datapod.coinduf.eu"
KUBO_GATEWAY_SUBDOMAIN: "subgateway.datapod.coinduf.eu"
restart: always restart: always
# ------ # ------
...@@ -69,3 +71,4 @@ services: ...@@ -69,3 +71,4 @@ services:
volumes: volumes:
db_data: db_data:
kubo_data: kubo_data:
kubo_init:
...@@ -15,11 +15,13 @@ ipfs config API.HTTPHeaders.Access-Control-Allow-Methods --json '["PUT", "POST"] ...@@ -15,11 +15,13 @@ ipfs config API.HTTPHeaders.Access-Control-Allow-Methods --json '["PUT", "POST"]
# --- gateway --- # --- gateway ---
# prevent gateway from fetching foreign data # prevent gateway from fetching foreign data
ipfs config Gateway.NoFetch --json true # ipfs config Gateway.NoFetch --json true
# allow to expose hostname # ipfs config Gateway.NoFetch --json false
ipfs config Gateway.PublicGateways --json "{\"$KUBO_GATEWAY_DOMAIN\":{\"UseSubdomains\": false,\"Paths\":[\"/ipfs\"]}}" # public gateway without subdomain (no wildcard)
# enables /ipfs and /routing (delegated routing)
# public gateway with subdomain (needs wildcard)
ipfs config Gateway.PublicGateways --json "{\"$KUBO_GATEWAY_DOMAIN\":{\"UseSubdomains\":false,\"Paths\":[\"/ipfs\",\"/routing\"]},\"$KUBO_GATEWAY_SUBDOMAIN\":{\"UseSubdomains\":true,\"Paths\":[\"/ipfs\",\"/routing\"]}}"
# only reprovide pinned data # only reprovide pinned data
ipfs config Reprovider.Strategy "pinned" # ipfs config Reprovider.Strategy "pinned"
# ipfs config Reprovider.Strategy --json null
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment