oddsdk / odd-app-template

A sveltekit web app template for the ODD SDK.
https://odd-template.fission.app
MIT License
29 stars 10 forks source link

Support some deployment options out of the box #9

Closed bmann closed 1 year ago

bmann commented 2 years ago

We should support static deployment platforms and show some examples that can immediately be forked / deployed.

I’ll list a couple but we should probably just ask different people to PR different providers. eG @bmann can do the Heroku version

We already support netlify, we should definitely consider IPFS-based providers as a deployment target

TODOs:

Maybe in the future:

Fission server (for dnslink) combined with Web3storage or Infura might be interesting to look at.

jeffgca commented 2 years ago

0.1 is scoped to publishing on Fission's publishing only.

bgins commented 2 years ago

Routing will likely be important for supporting these different platforms. Routify is a Svelte library that optionally supports hash-based routing: https://www.routify.dev/blog/routify-2-released#hash-based-routing.

We would want to use Routify V3, which is currently in Beta: https://v3.routify.dev/

jessmartin commented 2 years ago

0.1 is scoped to publishing on Fission's publishing only.

Bringing down the Scope Creep Hammer. I like it.

bmann commented 2 years ago

Yep totally agree on scope! This more like a meta issue to look at different targets.

gotjoshua commented 2 years ago

Routify is a Svelte library that optionally supports hash-based routing:

Does this mean that this repo will soon be able to be deployed via ipfs?

gotjoshua commented 2 years ago

I’m going to just list a couple as inspiration

are github and gitlab pages also realistic (can the stack build to a static site)?

i'd also suggest adding a docker-compose example for self-hosted deployment.

jessmartin commented 2 years ago

Does this mean that this repo will soon be able to be deployed via ipfs?

@gotjoshua By some definition of "soon", yes. @justincjohnson is working on a spec for IPFS that will support a _redirects file, which would allow for SPAs to be deployed via IPFS without hash-based routing.

We could look into hash-based routing, but haven't gotten to it yet. Routify introduces some complexity and we're trying to stick as close to vanilla Svelte as we can.

are github and gitlab pages also realistic (can the stack build to a static site)?

Yes! Svelte generates a static site. We could probably pretty quickly put together GitHub and GitLab pages examples.

i'd also suggest adding a docker-compose example for self-hosted deployment.

Feel free to create a separate issue for this one, it feels larger than the others.

justindotpub commented 2 years ago

For details on redirects support, see https://github.com/ipfs/specs/pull/290 and https://github.com/ipfs/kubo/pull/8890. Per https://github.com/ipfs/ipfs-docs/issues/1261#issuecomment-1231813073 maybe in 0.16 🤞

bgins commented 1 year ago

Does this mean that this repo will soon be able to be deployed via ipfs?

Should be able to soon! See #66 for details.

jeffgca commented 1 year ago

@jessmartin Cloudflare Pages is a stretch goal

jessmartin commented 1 year ago

We have Vercel and Cloudflare Pages working. Adding instructions to the README.

gotjoshua commented 1 year ago

Should be able

Would be perfect timing to get that ready during the ipfs camp as 66 is now merged

jessmartin commented 1 year ago

@gotjoshua It works! We have it running on an IPFS gateway server right now at https://webnative-template.fission.app

Let me know if you run into any trouble!