Skip to content

Deploy to IPFS#530

Closed
tcrowe wants to merge 33 commits intoMyBitFoundation:developfrom
tcrowe:deploy-to-ipfs
Closed

Deploy to IPFS#530
tcrowe wants to merge 33 commits intoMyBitFoundation:developfrom
tcrowe:deploy-to-ipfs

Conversation

@tcrowe
Copy link
Collaborator

@tcrowe tcrowe commented Jan 27, 2020

Related issue #518 Deploy dapp to IPFS

What does it do?

It modifies the app and tooling to create a ⚡️ static-only export ⚡️ without any server functionality.

How to test

Previews

  1. git clone -b deploy-to-ipfs https://github.com/tcrowe/MyBit-Go.app
  2. yarn && yarn run clean && yarn run build && yarn run export
  3. ./node_modules/.bin/ipfs-deploy --no-open -p pinata -d cloudflare out

⍟ Step 3 requires some secret environment variables to run. We've communicated behind the scenes to do it.

Changes

Third-party services removed

  • zeit now
  • Amazon AWS

Packages removed

Strictly speaking it wasn't necessary to remove all these but they aren't being used anymore.

  • aws-sdk
  • civic-sip-api
  • classnames
  • compression
  • cors
  • express
  • less
  • lint
  • multer
  • node-sass-chokidar
  • nodemon
  • preact
  • react-facebook-pixel
  • react-ga
  • react-router-dom
  • react-twitter-conversion-tracker
  • babel-watch
  • compression-webpack-plugin
  • enzyme
  • enzyme-adapter-react-16
  • extract-text-webpack-plugin
  • rimraf

Upgrades

All modules put up to latest stable version. Most notably:

  • nextjs@9.21 up from 8 alpha

IPFS gateway

It has a configurable way to pull IPFS files like for avatars. See ./constants/links.js#ExternalLinks.IPFS_GATEWAY_URL

Currently cloudflare-ipfs.com

Ethereum Gas price

It has a configurable way to get Ethereum Gas prices../constants/links.js#ExternalLinks.GAS_PRICE_URL

Currently https://www.etherchain.org/api/gasPriceOracle

Uploads

Previously it was uploading to AWS. Now testing.

Deploy

  1. The CI/CD will build a static export instead of deploying to zeit now.
  2. The nextjs static build goes to Piñata IPFS
  3. CloudFlare DNS and DNS TXT record for DNSLink are set (New technology)

@tcrowe tcrowe mentioned this pull request Feb 1, 2020
@tcrowe tcrowe changed the title WIP: Deploy to IPFS Deploy to IPFS Feb 7, 2020
@cryptnotiq
Copy link
Contributor

cryptnotiq commented Feb 8, 2020

@tcrowe Please see the following issues I found.
#539
#540
#541

@tcrowe
Copy link
Collaborator Author

tcrowe commented Feb 22, 2020

It's not totally related to IPFS but it helps us move through testing to tweak and fix a few things along the way. This last patch I changed "undefined" to "Default category" here and allowed customizing the asset value.

Screen Shot 2020-02-22 at 2 09 23 PM

I did see a successful upload to IPFS and then another failure so I will need to refine how it's done in the next patch.

@MyBitIO

logging changed from console.log to console.error for errors
@tcrowe
Copy link
Collaborator Author

tcrowe commented Mar 1, 2020

I'm going to shelve this one for a minimal change to make this work then we can go optimize some things later.

@tcrowe tcrowe closed this Mar 1, 2020
@tcrowe tcrowe mentioned this pull request Mar 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants