Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethink dev - staging - production modes #106

Open
kapouer opened this issue Sep 2, 2021 · 1 comment
Open

Rethink dev - staging - production modes #106

kapouer opened this issue Sep 2, 2021 · 1 comment

Comments

@kapouer
Copy link
Member

kapouer commented Sep 2, 2021

A site can be:

  • compiled (transpiled and bundled and minified)
  • hooked to git
  • frozen (webmaster cannot change blocks, maybe only inline blocks or href)
  • optimized (makes sense when frozen)
  • assigned to a domain (and exposing sitemap to robots) or not

The workflow for a site is:

  • debug: uncompiled, unfrozen, unoptimized, unassigned. Source is a git repo.
  • dev: compiled, unfrozen, unoptimized, unassigned
  • staging: compiled, frozen, optimized, unassigned
  • production: compiled, frozen, optimized, assign

dev -> staging or dev -> production should be done by first making a copy of the current site in dev mode.
This should be a "smart" copy that doesn't copy "uploads" folder of the dev site, since uplods are immutable
they can be shared between all modes.

Then staging -> production is done using the same "site".
This way one can continue to develop the site while having a production site running.

Optimizing regroups:

  • purge all unused elements (and their deps...)
  • purge css by crawling "all" pages
  • recompile all

Production versions are not necessarily erased - this way one can assign the domain to a previous production version.

git hooks should only apply to debug/dev mode.
In particular, git tags no longer do something specific (like update only production).
Only debug/dev mode shall allow reinstalling a site from git repository.

  • mysite.pageboard.io always points to development site.
  • mysite-commitish.pageboard.io points to a specific commit or tag of a staging copy.
  • mydomain.com points to mysite-commitish.pageboard.io (internally) which is a staging copy that became production.
@kapouer
Copy link
Member Author

kapouer commented Sep 2, 2021

As a consequence of this, the granularity of the client modules can be improved:

  • all generic elements can be defined in a single module
  • others are for external modules (private|unsupported|unmaintained)
    This won't change the way page bundles are built - just simplify maintenance and versioning.

This makes it clearer that a new element is needed: the "domain" - which is not exactly a "site".

Also "copy of site" is not that simple: the blocks generated by "users" (i.e. not webmaster) in production site must not be erased/modified when copying (from dev to production) the blocks generated by webmaster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant