CodeForPhilly / laddr

http://codeforphilly.github.io/laddr/
MIT License
61 stars 34 forks source link

Emergence pull tool on CfC #139

Closed schlos closed 8 years ago

schlos commented 8 years ago

I've pulled all changes from staging to production (cfc), but new pages (checkin/open-zagreb and checkin/code-for-croatia) are not available on production.

Screen from develop editor on production: https://qsnapnet.com/snaps/q3r4kpnv5n1xlxr it's missing custom folder in staging.cfodeforcroatia.org /checkin.

How can I pull it on production?

Thanks!

themightychris commented 8 years ago

@schlos in its default configuration, an emergence site employes a download-on-read strategy to lazily download and store content from the parent site as-needed. The pull tool does not mirror the parent site, but rather only updates already-downloaded files that have new versions.

Another tool, /site-admin/precache can be used to discover and download all content for all or part of the parent site ahead of it being read.

The configuration option Site::$autoPull controls whether the parent site gets queried for content during reads. It looks like autoPull is currently enabled on the cfc production site, so you should be able to just visit those pages on the production frontend to have them and all dependencies pulled down into the parent site cache.

Normally on a production site I would use precache+pull tool to download everything, giving the production site a complete and up-to-date mirror of its parent in cache, and then disable Site::$autoPull to gain a big runtime speed boost from not querying the parent for content whenever something requested isn't available in the cache.

Overall this idea of lazily downloading assets from parent sites has proven more confusing and complicating than efficient, and a future release of the platform will move to fully cloning an image of the parent site via git when a site is created.