ipfs-shipyard / ipfs-deploy

Zero-Config CLI to Deploy Static Websites to IPFS
Other
1.16k stars 122 forks source link

Feature: unpin old code (keep latest N revisions) #131

Open sixcorners opened 4 years ago

sixcorners commented 4 years ago

So uh... I've never really bought into the whole "permanent" web thing. I think it would be nice if I could have this unpin old deployments.

RuiNtD commented 3 years ago

Agreed. Especially when using a pinning service like pinata.cloud, I don't want to have to be charged for having multiple copies of my website pinned.

hacdias commented 3 years ago

This is definitely an interesting feature and could be implemented by simply looking at the previous DNSLink value and unpinning it in the service. Perhaps through a flag --unpin-old.

kespinola commented 3 years ago

I'm interested in this feature as well. And am up to add it.

Some questions I have around it:

RuiNtD commented 3 years ago

I'm interested in this feature as well. And am up to add it.

Some questions I have around it:

  • If the previous pin is removed and DNS is still populating will there be a chance for a service outage?

  • I imagine this needs to be rolled out to the 3 supported providers. Any way to rollout for one first? I'm working with cloudflare. I suppose can skip if the service doesn't respond to the additional methods to perform the unpin.

  1. This wouldn't be implemented on DNS providers. This would be implemented on the pinning services (like Pinata).
  2. Whether or not this causes an outage really just depends on how long TTL is on the DNSLink record. However, users can prevent an outage from occurring by uploading to their preferred pinning service (like Pinata) and pinning with Infura (which is free to use). ipfs-deploy site -u pinata -p infura
RuiNtD commented 3 years ago

On a side note: I feel like it might be important to delete old pins before uploading the new pin. If done in the other order, it might be possible for users to hit a quota on some pinning services.