This file is part of: PHP Development Template Stack
Copyright (c) 2024 Nico Jan Eelhart
This source code is licensed under the MIT License found in the ‘LICENSE.md’ file in the root directory of this source tree.
What
This is a template Docker development/Swarm container for PHP developers. When you want to use this as a development template, for your docker PHP project (including composer and PHPUnit) you can use the following quick setup reference
- Debian container with: Apache, PHP, PHP-FPM (CGI gateway), PHPUnit, Symfony, Codeception (TODO AddOn)
- Instructions for adding additional PHP versions
- Instructions for creating a development container. Use this for creating and starting a local container, for development and test work.
- Instructions for configuring PHP debugging (Xdebug)
- Instructions to create an (optional) Swarm, this involves:
- Installing Multipass, see Multipass
- Creating multiple Virtual Machines with Multipass (needed for the swarm)
- Initializing the swarm and defining the VMs as docker Manager or docker Worker
- Making an Image required for the swarm
- Publishing the image to a registry (Docker Hub)
- Deploy the swarm service (pulling the image from docker hub)
You can use this container to develop your PHP based application, a simple sample application is available in the directory: \ApachePHPWebService\app. Or use it to test the docker swarm functionality.
For the first stable release, use the release/1.0 template branch
Where more information
More documents can be found in the ‘Howto” directory. it contains:
- Development container document: open how to create a development container
- Swarm document: open how to create a swarm of this container
- Instructions to install and use other PHP versions: open how to install other PHP versions
- Instructions to configure/install debugging see: how to include debugging
- Document root adjustments in: /usr/local/apache2/conf/extra/httpd-vhosts.conf
Side note: Personal maintenance instructions
Personal maintenance instructions
The template containers are maintained only in the DTS. I copy these to a project directory and customize them there for the project. If the customization is generic, I will merge it into the DTS template project
Personal project structure
Docker-Template-Stacks (DTS) Project Location DTS\PHP Development Template Stack\ \Php\Projects\projectX DTS\Rust Template Stack\ \Rust\Projects\ProjectY
Update: these template central!