From 18f3c2cc4fd006e4d9c1fc2d54a5c7a7feff642b Mon Sep 17 00:00:00 2001 From: zramsay Date: Thu, 13 Apr 2023 06:55:47 -0400 Subject: [PATCH] update kubo stack README to enable CORS for running in the cloud Former-commit-id: cfa32a3515ee2d2a274753c695f4251961f545ee --- app/data/stacks/kubo/README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/app/data/stacks/kubo/README.md b/app/data/stacks/kubo/README.md index a7c3ae98..233874c1 100644 --- a/app/data/stacks/kubo/README.md +++ b/app/data/stacks/kubo/README.md @@ -1,7 +1,38 @@ # Kubo (IPFS) -The Kubo stack is currently uses the provided docker image, therefore a single command will do: +The Kubo stack currently uses the native IPFS docker image, therefore a single command will do: ``` laconic-so --stack kubo deploy up ``` + +If running locally, visit: [localhost:5001/webui](localhost:5001/webui) and explore the functionality of the WebUI. + +If running in the cloud, visit `IP:5001/webui` and you'll likely see this error: "Could not connect to the IPFS API". To fix it: + +1. Get the container name: + +``` +docker ps +``` + +``` +4dc93dea88df ipfs/kubo:master-2023-02-20-714a968 "/sbin/tini -- /usr/…" 51 minutes ago Up 51 minutes (healthy) 0.0.0.0:4001->4001/tcp, 0.0.0.0:5001->5001/tcp, 4001/udp, 0.0.0.0:8080->8080/tcp, 8081/tcp laconic-dbbf5498fd7d322930b9484121a6a5f4-ipfs-1 +``` + +2. Go into the container (replace with your container name): + +``` +docker exec -it laconic-dbbf5498fd7d322930b9484121a6a5f4-ipfs-1 sh +``` + +3. Enable CORS as described in point 2 of the error message. Copy/paste/run each line in sequence, then run `exit` to exit the container. + +4. Restart the container: + +``` +laconic-so --stack kubo deploy down +laconic-so --stack kubo deploy up +``` + +5. Refresh the `IP:5001/webui` URL in your browser, you should now be connected to IPFS.