How to build a Docker development setup for PHP Projects [Tutorial Part 3]
In the third part of this tutorial series on developing PHP on Docker we'll lay the fundamentals to build a complete development infrastructure and explain how to "structure" the Docker setup as part of a PHP project. Structure as in
- folder structure ("what to put where")
- Dockerfile templates
- solving common problems (file permissions, runtime configuration, ...)
We will also create a minimal container setup consisting of php-fpm, nginx and a workspace container that we refactor from the previous parts of this tutorial.
Published parts of the Docker PHP Tutorial
- Setting up PHP, PHP-FPM and NGINX for local development on Docker (2018-07-08)
- Setting up PhpStorm with Xdebug for local development on Docker (2018-08-06)
- Structuring the Docker setup for PHP Projects (2019-05-20)
All code samples are publicly available in my Docker PHP Tutorial repository on github. The branch for this tutorial is part_3_structuring-the-docker-setup-for-php-projects.
If you want to follow along, please subscribe to the RSS feed or via email to get automatic notifications when the next part comes out :)
Acknowledgements
Shout out to Nils Meyer for giving the final "[...] nichts offensichtlich falsch" ("nothing obviously wrong") :)
Table of contents
- Introduction
- Structuring the repository
- Defining services: php-fpm, nginx and workspace
- Setting up docker-compose
- Makefile and
.bashrc
- Fundamentals on building the containers
Truncated by Planet PHP, read more at the original (another 58661 bytes)