Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Thoughts on Environments

Started by Muut Archive 10 years ago · 3 replies · 412 views
10 years ago

This has been discussed a few times, with various philosophies on handling environments for testing, staging, and production. I am at a point where all of the above are necessary, with an additional environment specifically for page-preparation (a clean way of generating optimal responsive images).

Simply put, my workflow looks like this:

  • Testing: Develop templates and styling (on a non-cached Grav installation), using mock pages and content.
  • Pages: Format and spellcheck actual pages, generate responsive images (non-destructively, through gulp).
  • Staging: Test site with actual pages on current templates and styles (cached Grav).
  • Production: Live, optimized site with actual pages etc.

Basic Workflow

I am wanting/trying to secure some level of consistency in the Staging and Production environments through version control, Git as it happens, but as ever that is a beast in itself and there are many a way to skin this cat. Thus, I am currently pushing template- and style-files from Testing, as well as Pages, to Staging, which when the y check out are pushed to BitBucket which automatically deploys to the Live server. Like so:

Git Workflow

However, managing .gitignore-files, gulp pipelines and avoiding conflicts in Git really can be a hassle in terms of avoiding superfluous files or having to resolve conflicts down the line.

How do people prefer to set up their deployments, and what experiences do you have with multiple environments? Ideally I would hope to reduce the need for many repositories, and potentially allow for some CI-build system wherein changes were not pushed if PHP/Twig returned a fatal error.

10 years ago

I wrote a note with an update on my progress in setting up my development environments and deployment-process. In essence:

Extended workflow

10 years ago

This is an interesting approach. It's a bit more involved than I mostly want to bother with, but it definitely seems like a solid solution that gets you from flexible development setup to streamlined and optimized production environment efficiently.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1368 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago