Merge pull request #320 from cerc-io/add-kubo-stack

Add kubo (IPFS) as a stack
This commit is contained in:
Zach 2023-04-19 21:48:55 -04:00 committed by GitHub
commit 45cab0f33d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 3 deletions

View File

@ -8,6 +8,6 @@ services:
- ./ipfs/import:/import - ./ipfs/import:/import
- ./ipfs/data:/data/ipfs - ./ipfs/data:/data/ipfs
ports: ports:
- "8080" - "0.0.0.0:8080:8080"
- "4001" - "0.0.0.0:4001:4001"
- "5001" - "0.0.0.0:5001:5001"

View File

@ -0,0 +1,30 @@
# Kubo (IPFS)
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: 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 with `docker ps`:
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.

View File

@ -0,0 +1,7 @@
version: "1.0"
name: kubo
description: "Run kubo (IPFS)"
repos:
containers:
pods:
- kubo