From eae124fdf161db9cfb675cd3cc2aaccbdfd6b002 Mon Sep 17 00:00:00 2001 From: zramsay Date: Wed, 12 Apr 2023 17:36:47 -0400 Subject: [PATCH 1/4] run kubo as a stack --- app/data/stacks/kubo/README.md | 7 +++++++ app/data/stacks/kubo/stack.yml | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 app/data/stacks/kubo/README.md create mode 100644 app/data/stacks/kubo/stack.yml diff --git a/app/data/stacks/kubo/README.md b/app/data/stacks/kubo/README.md new file mode 100644 index 00000000..a7c3ae98 --- /dev/null +++ b/app/data/stacks/kubo/README.md @@ -0,0 +1,7 @@ +# Kubo (IPFS) + +The Kubo stack is currently uses the provided docker image, therefore a single command will do: + +``` +laconic-so --stack kubo deploy up +``` diff --git a/app/data/stacks/kubo/stack.yml b/app/data/stacks/kubo/stack.yml new file mode 100644 index 00000000..2552df38 --- /dev/null +++ b/app/data/stacks/kubo/stack.yml @@ -0,0 +1,7 @@ +version: "1.0" +name: kubo +description: "Run kubo (IPFS)" +repos: +containers: +pods: + - kubo -- 2.45.2 From e72ea19c5cb93dfad26463e02ff8dbe7d2e2a74c Mon Sep 17 00:00:00 2001 From: zramsay Date: Thu, 13 Apr 2023 05:27:04 -0400 Subject: [PATCH 2/4] expose ports --- app/data/compose/docker-compose-kubo.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/data/compose/docker-compose-kubo.yml b/app/data/compose/docker-compose-kubo.yml index 11c1d2ee..f5f8b06e 100644 --- a/app/data/compose/docker-compose-kubo.yml +++ b/app/data/compose/docker-compose-kubo.yml @@ -8,6 +8,6 @@ services: - ./ipfs/import:/import - ./ipfs/data:/data/ipfs ports: - - "8080" - - "4001" - - "5001" + - "0.0.0.0:8080:8080" + - "0.0.0.0:4001:4001" + - "0.0.0.0:5001:5001" -- 2.45.2 From cfa32a3515ee2d2a274753c695f4251961f545ee Mon Sep 17 00:00:00 2001 From: zramsay Date: Thu, 13 Apr 2023 06:55:47 -0400 Subject: [PATCH 3/4] update kubo stack README to enable CORS for running in the cloud --- 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. -- 2.45.2 From bafdfe6d2a6550595c96fa66533f59edb8314130 Mon Sep 17 00:00:00 2001 From: zramsay Date: Thu, 13 Apr 2023 07:05:03 -0400 Subject: [PATCH 4/4] lil fixes --- app/data/stacks/kubo/README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/data/stacks/kubo/README.md b/app/data/stacks/kubo/README.md index 233874c1..e9b12321 100644 --- a/app/data/stacks/kubo/README.md +++ b/app/data/stacks/kubo/README.md @@ -6,19 +6,11 @@ The Kubo stack currently uses the native IPFS docker image, therefore a single c 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 locally, visit: http://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 -``` +1. Get the container name with `docker ps`: 2. Go into the container (replace with your container name): -- 2.45.2