Skip to content

Fundamentals and Concepts

cmtickle edited this page Apr 24, 2023 · 2 revisions

Concepts/Principles.

The Docker-Stack was created as nothing else was quite able to meet the requirements which Colin (@cmtickle) encountered.

  • Fast performance cross-platform (mainly Ubuntu and Mac OS).
  • A single set of containers for all projects (if you have 20 projects running PHP 7.4, there will only ever be 1 PHP 7.4 container).
  • Capable of running multiple projects at the same time.
  • Scripted project setup.
  • Support for centralised database backups and configuration.
  • Maintainable by a multidisciplinary team.
    • DevOps/Sysadmin/Support - Docker, Docker-Compose, setup scripts in Bash.
    • Developers - Want and need to be self-sufficient. Sometimes limited DevOps skills. Sometimes interested in DevOps or advanced in this area.
  • Open and editable.
  • Free to use.

Ease Versus Flexibility

Docker-Stack aims to provide ease of use for those who want it to "just work" but not at the cost of preventing flexibility and control for advanced users.

Base images are used from Docker Hub but any customisation beyond that is performed with via Dockerfile and human-readable edits. This results in a stack which can take a little longer for first installation, but that compromise allows greater flexibility.

For example: Developer Doe requires some little-used PHP extension, they are able to edit the PHP Dockerfile, run ./project/project_doe docker:refresh and have access to it without waiting for DevOps to add it, version and upload the image to Docker Hub, update the project docker-compose files etc.

The Folder Structure.

  • ./bin - The docker-compose wrapper (which makes a lot of this work) and other utility scripts.
  • ./docker - Folders for each container/service containing Dockerfiles and resources to build the various containers. The docker-compose yaml definition files for services, volumes, cross-platform capabilities and customisations such as file synchronisation.
  • ./project - Bash helper scripts used for the automated setup and day-to-day management of the stack and Magento projects.
  • ./src - If file synchronisation (volume mounting or, on Mac, Mutagen) is enabled, your projects will be cloned to (or created) here.

For now, that's it. Everything will become clearer through the utilisation of the Stack and further documentation.

Clone this wiki locally