Open mveytsman opened 7 years ago
IMO implement it "properly" and let it be slow until IPNS is fixed. Meanwhile we can workaround with publishing the latest hash somewhere and let people access it directly if they want?
In that case, can you start by setting a TXT record of dnslink=/ipns/QmPNsQkxFh5zp6CaGDTp1EhZzhH6Tre6Bdt12ZrY7M8q4k
to thousandetherhomepage.com
Linking this for future reference https://github.com/ipfs/examples/tree/master/examples/websites
Done.
https://gateway.ipfs.io/ipns/thousandetherhomepage.com/ works for me!!!
TODO
Here's what I was expecting to do:
1) Create a shared ipfs key (there's one in keybase now called
3) run to a for
ketherkey
) 2) On deploy runipfs add thousandetherhomepage.github.io
-> this returns a hashipfs name publish --key=ketherkey /ipfs/<HASH>
this fixesketherkey
which is constant 4) Set a DNS TXT record of/ipns/<PeerID>
5) Now we're available at/ipfs/<HASH>
(only this version) or/ipns/<PeerID>
(immutable name) or/ipns/thousandetherhomepage.com
(immutable name)This should work in theory, but it looks like ipns is pretty slow on resolution based on my testing. The PeerID for the ketherkey is
QmPNsQkxFh5zp6CaGDTp1EhZzhH6Tre6Bdt12ZrY7M8q4k
and you'll see that https://gateway.ipfs.io/ipns/QmPNsQkxFh5zp6CaGDTp1EhZzhH6Tre6Bdt12ZrY7M8q4k is much slower than https://gateway.ipfs.io/ipfs/QmbmyPwSTn4XZQnc2GJ6WxfQQXVCQcT74tCeZWRjbNNWL5/This appears to be a known issue, i.e. see https://github.com/ipfs/go-ipfs/issues/3860#issuecomment-335063820
One thing we can do is skip ipns and just use the DNS. If we set the TXT record to
/ipfs/<HASH>
, then/ipns/thousandetherhomepage.com
should resolve to the ipfs hash, skipping slow ipns resolution.The problem is that we would have to update DNS on every deploy to point to the latest version. We can do this manually, or if it's too much effort we can use the Cloudflare API. Unfortunately, Cloudflare doesn't have per-domain keys, so if we're sharing this API key, we'd need to create a new Cloudflare account just for thousandetherhomepage.com and move the domain to it....
What do you think about all of this @shazow