The topmost layer of the stack is the application source-code in /src
. The PHP application is build with
Yii 2.0 Framework.
The building blocks of the application.
The application along with other services are run in containers, usually you have one container per service, but you can also scale PHP-FPM with a haproxy or run multiple workers off a CLI container.
Services are defined in docker-compose.yml
they describe the stack components, such as the PHP application, databases,
caches or testing containers.
Stacks and their service definitions can have different flavours. You may need slightly different setups in testing, staging
and production environment. phd features as yaml-converter-command
, which can create stack files from templates.
Docker is the container-engine in which all services and tools are run, this ensures a maximum of portability across platforms and environments.
Docker & docker-compose
docker-compose.yml docker container setup
Dockerfile docker image build information
Application source
.env environment config
src/ application source-code
yii application CLI
runtime/ files generated during runtime
Build support
Makefile build and Docker stack control-targets
build/ files for Docker build tasks
Testing
codeception.yml test-suite configuration
tests/ various tests for objects that are common among applications
assets/ application assets such as JavaScript and CSS
config/ application configuration
controllers/ web-controller classes
commands/ console controller classes
models/ application model classes
modules/ application modules (eg. admin)
migrations/ database migrations
views/ view files for the application
web/ document root with entry-script