mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-11-01 22:21:07 +00:00
Remove the inherited gh-pages, IPFS and Docker Hub release tooling
None of it could run here: the repository has no Pages site, no Pinata or Crust credentials and no npm token, and docker/build.sh pushed to the upstream author's Docker Hub account. Remove the release scripts, the IPFS uploader with @pinata/sdk (axios 0.21) and @crustio/crust-pin, and public/ipfs, whose pin.json and redirect pointed at another project's IPFS build from this site. README: the hosted URL is apps.pezkuwichain.io; drop the IPFS and desktop chapters and the pull of a Docker image that does not exist. .gitignore listed '.log' where '*.log' was meant, which let start.log in. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f72ba84aac
commit
f3e338df6d
9 files changed
+17
-739
No files matched your search
@@ -2,9 +2,7 @@
|
||||
|
||||
A Portal into the Pezkuwi and Bizinikiwi networks. Provides a view and interaction layer from a browser.
|
||||
|
||||
This can be accessed as a hosted application via https://pezkuwichain.app or you can access the IPFS hosted version via https://pezkuwichain.app/ipfs (via hash) to explore any of the supported Pezkuwi and Bizinikiwi chains.
|
||||
|
||||
If you run one or more IPFS node(s), pinning the UI (which only gets updated on releases) will make it faster for you and others. You can find details about that below in the IPFS chapter below.
|
||||
It is hosted at https://apps.pezkuwichain.io to explore any of the supported Pezkuwi and Bizinikiwi chains.
|
||||
|
||||
**Important** If you are a chain developer and would like to add support for your chain to the UI, all the local configuration (API types, settings, logos) can be customized in [the apps-config package](packages/apps-config#README.md), complete with instructions of what goes where.
|
||||
|
||||
@@ -32,113 +30,11 @@ To get started -
|
||||
|
||||
## Docker
|
||||
|
||||
You can run a docker container via -
|
||||
To build and run a container with local changes -
|
||||
|
||||
```
|
||||
docker run --rm -it --name pezkuwi-ui -e WS_URL=ws://someip:9944 -p 80:80 pezkuwichain/pezkuwi-apps:latest
|
||||
docker build -t pezkuwi-apps -f docker/Dockerfile .
|
||||
docker run --rm -it --name pezkuwi-ui -e WS_URL=ws://someip:9944 -p 80:80 pezkuwi-apps
|
||||
```
|
||||
|
||||
To build a docker container containing local changes -
|
||||
|
||||
```
|
||||
docker build -t pezkuwichain/pezkuwi-apps -f docker/Dockerfile .
|
||||
```
|
||||
|
||||
When using these Docker commands, you can access the UI via http://localhost:80 (or just http://localhost)
|
||||
|
||||
## IPFS
|
||||
|
||||
IPFS allows sharing files in a decentralized manner in a similar fashion the pezkuwi network exchanges blocks. IPFS works best when many nodes seed the same data. Nodes can seed specific data by **pinning** them.
|
||||
|
||||
You can pin with the following command:
|
||||
|
||||
```
|
||||
curl -s https://pezkuwichain.app/apps/ipfs/pin.json | jq -jr .IpfsHash | xargs -0 -I CID ipfs pin add --progress CID
|
||||
```
|
||||
|
||||
Here is a script you can save as `/usr/local/bin/pezkuwijs-ipfs-pin.sh`:
|
||||
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
|
||||
IPFS='/usr/local/bin/ipfs'
|
||||
curl -s https://pezkuwichain.app/apps/ipfs/pin.json | jq -jr .IpfsHash | xargs -0 -I CID $IPFS pin add --progress CID
|
||||
```
|
||||
|
||||
I suggest to run the script once. The output should be similar to (the CID/Hash will very likely be different though):
|
||||
```
|
||||
$ /usr/local/bin/pezkuwijs-ipfs-pin.sh
|
||||
pinned QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW recursively
|
||||
```
|
||||
|
||||
Now that you know the CID (hash), you can check whether the data is already pinned or not:
|
||||
```
|
||||
$ ipfs pin ls | grep QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW
|
||||
QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW recursive
|
||||
```
|
||||
|
||||
Now that we know it works, we can automate that with a cron task. Run `crontab -e`.
|
||||
If you see only comments, append the following to the file and save:
|
||||
```
|
||||
SHELL=/bin/bash
|
||||
HOME=/
|
||||
0 * * * * /usr/local/bin/pezkuwijs-ipfs-pin.sh >/dev/null 2>&1
|
||||
```
|
||||
|
||||
Now our script will run every hours at minute '0' (8:00, 9:00, etc...). To check, we can unpin temporarily:
|
||||
```
|
||||
$ ipfs pin rm QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW
|
||||
unpinned QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW
|
||||
```
|
||||
|
||||
Now asking for the CID confirms that is it not there.
|
||||
```
|
||||
$ ipfs pin ls QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW
|
||||
Error: path 'QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW' is not pinned
|
||||
```
|
||||
|
||||
Wait until the your cron task runs and try again:
|
||||
```
|
||||
$ ipfs pin ls QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW
|
||||
QmNYAbzaE8kRAf68YiN3ZuUxgdwroeav3JhicsHsG5b2oW recursive
|
||||
```
|
||||
|
||||
Tada! This is now automatic and you may forget it.
|
||||
|
||||
If you are curious and want to know how many people seed the UI on IPFS, here is the magic command (it may take a while to return the answer as ipfs will search for about 1 minute):
|
||||
```
|
||||
ipfs dht findprovs QmTejwB7mJPBHBoqubjzHSgSxfLMcjnZA3LFefqoQc87VJ | wc -l
|
||||
```
|
||||
|
||||
If you are current about the content of what you just pinned, you may use the following command:
|
||||
```
|
||||
$ ipfs ls QmTejwB7mJPBHBoqubjzHSgSxfLMcjnZA3LFefqoQc87VJ
|
||||
QmPJGyqVCcXm238noz7TZDByyGa35qqc8g6sfyXF3KDXZ3 38078 favicon.ico
|
||||
QmdouVsVE9rMVB84Cy1ehVi1LAGW1fKcqqQxSEjgxJrv7H 668 index.html
|
||||
QmWHcGf1JCFZCYjZsw52vM5RiJVbcNpX1fo2NyoBKBvtuf - ipfs/
|
||||
QmT6NwDsJzMyBs6bMq845nMumeJWbixBfNXA9hdAhAMdSG - locales/
|
||||
QmcgiZpwvpT1E1dkSS3zr5je89rZRVocNKPebgWhn3JVTC 2178582 main.ce05dfca.js
|
||||
QmdnEtuhFDyw5Tjr82bFPzyveFrbkYjJAnUvBvzwT18YGG 337 manifest.json
|
||||
QmW7gDKHbmtD7sRTqsvyo84bDpyYPZR3w1wQo8pme2q5HC - next/
|
||||
Qmd8UnRQiBobm4qb6dhiC1HoQ7SvwZrWJenoN3JPEV3iiF 480594 pezkuwijs.3af757ad.js
|
||||
QmUfXPMfNys8Y8dekuankBx7BHiSAjALCpBDKH6F5DdcNm 628284 react.0cecb00d.css
|
||||
QmSEgXdQbC1ek9Td1mHy3BRvJpfWHm9zQYegTgAUj1QC4g 924156 react.8f083b49.js
|
||||
QmfGBgFe2aqf83Wv21m9k5DH2ew89CDj4tydoxJWdK6NNL 1552 runtime.3d77e510.js
|
||||
QmYPa8jcHH7gfopMALr5XTW4i1QM2xgVBe3NeP11y3tErA - static/
|
||||
QmeYBC5EgbccC8NEwXC2rvbd93YiHtTM5xYzqCDohXerDf 859984 vendor.8b793a81.js
|
||||
```
|
||||
|
||||
## Desktop App
|
||||
|
||||
The main advantage of using Desktop App is that it by default stores encrypted accounts on the filesystem instead of browser's local storage.
|
||||
Local storage is susceptible to attacks using XSS (Cross-Site Scripting). There's no such risk when with files stored on disk.
|
||||
|
||||
The desktop app uses the [Electron](https://www.electronjs.org/) framework. It provides the same features as web app, the only difference
|
||||
being different account storage.
|
||||
|
||||
The accounts are stored in the following directories:
|
||||
* Mac: `~/Library/Application Support/pezkuwi-apps/pezkuwi-accounts`
|
||||
* Linux: `~/.config/pezkuwi-apps/pezkuwi-accounts` (or `$XDG_CONFIG_HOME/pezkuwi-apps/pezkuwi-accounts` if `$XDG_CONFIG_HOME` is defined)
|
||||
* Windows: `%APPDATA%\pezkuwi-apps\pezkuwi-accounts`
|
||||
|
||||
For more details on the desktop app, head over to [Electron package README](https://github.com/pezkuwichain/pezkuwi-apps/blob/master/packages/apps-electron/README.md).
|
||||
The UI is then at http://localhost:80 (or just http://localhost)
|
||||
Reference in new issue
Block a user