
Show HN: IPFS-Deploy – Zero-Config CLI to Deploy Static Websites to IPFS - agentofuser
https://github.com/agentofuser/ipfs-deploy
======
agentofuser
Hi! Author here. This is my first npm package, so I'd love to hear feedback on
how I can improve it, what tools I can use for that, etc. Thank you for
checking it out :)

~~~
restwell
Is it possible to update a website hosted on IPFS and push those changes to
all IPFS users?

The equivalent on AWS Cloudfront would be breaking the cache, so all users
would see the most recent version.

I'm not sure if this would work on IPFS because it seems more like a P2P
network and there might be many different (and old) versions of the site at
different locations in the system, with no way of controlling who sees what.

~~~
icebraining
Not an expert, but:

IPFS is p2p, but all the content is accessed only by a hash, so the same
address always refers to the same version; when you update the site, you're
actually creating a new address, leaving the old untouched.

Using Cloudflare, you can tie a regular domain to one of these addresses, but
that "tie" is only stored there, so when you push a new version, you can
update the Cloudflare settings, and everyone connecting to the domain will see
the new version "immediately", even if the old version still exists in the p2p
network.

~~~
totony
ipfs has its own mutable content adressing named IPNS

------
dane-pgp
Does it make sense to add support for Signed HTTP Exchanges (SXG) to this?

[https://github.com/ipfs/in-web-
browsers/issues/121](https://github.com/ipfs/in-web-browsers/issues/121)

~~~
agentofuser
Good idea! I've been following Web Packaging from a distance, so would need to
do some research, but from the looks of it, ipfs-deploy could automate
packaging up a directory into an SXG before uploading it to pinners. Gotta
figure out how to the signing part though. I'll look into it!

------
neiman
Great job, simple and easy, as a tool should be. I'm definitely gonna use it.

~~~
agentofuser
Thank you! It makes me very happy to hear that. Feel free to ping me if you
run into any trouble (even if it's just a non-showstopper like some
unnecessary friction or papercut.) Also keen on hearing what services I should
add next. I don't use AWS Route 53 but I think it would be a good option to
support for instance.

~~~
neiman
We're working on a small browser extension for static ipfs websites where this
comes in handy. I'll ping to let you know how it goes.

------
bravura
With IPFS what are the costs to keep your site live?

~~~
theamk
It is like torrent, so you need to have a seeder node all the time - it is
called “pinning” in IPFS.

There is a number of services, the price seems to be around $0.3/(gb*month)

~~~
gitgud
How does that compare with AWS? Is IPFS worth using for a CDN? _(apologies for
the acronyms...)_

~~~
agentofuser
If you pin to IPFS and then use a public http gateway like
[https://cloudflare-ipfs.com](https://cloudflare-ipfs.com), which caches and
distributes via their CDN, you'll have a good CDN alternative.

If you just use IPFS directly with a non-CDN'd, non-cached http gateway, the
latency will probably be prohibitive for regular web stuff.

~~~
gitgud
But isn't it like a torrent? where if more people are viewing the item, it can
be served faster from more places, like torrent seeders?

~~~
agentofuser
Yes, definitely. I mean, you certainly get better bandwidth and latency
depending on popularity and geographic diversity of seeders, and there are
even youtube-alternative websites that host videos on IPFS. But for something
like browsing from one page to the next, where the payload is small and you
want <200ms latency, I think just the DHT lookup might already put you above
that budget. I'm guessing though, haven't made any measurements.

~~~
mtgx
Who gets <200ms latency anymore when Google analytics and FB pixel tracking
scripts take more than that each and most websites have them?

~~~
icebraining
Those scripts are loaded asynchronously; you can start seeing content before
they are ready.

