Deploying php code with IPFS

in #ipfs6 years ago

So here's how you do it.

  1. Compile your code into a phar, and set it to work with a configuration from the file system.
  2. Add the phar to IPFS.
  3. Write some code to download your phar from ipfs.
  4. Execute it on the other side.
  5. Edit your config file, and Enjoy.

It sort of works the way Git does, but with a lot less overhead.
If all you want to do is globally deploy your code, this method will work pretty well.

Or you could deploy individual files and call them as they need to run with some kind of router.
It's an awfully heavy approach though, which is why I think Phars make more sense, even if the final code that gets executed doesn't actually live in ipfs.