Docker is the container-engine in which all services and tools are run, this ensures a maximum of portability across platforms and environments.
TODO: Link to Docker Docs
Services are defined in docker-compose.yml
they describe the stack components, such as the PHP application, databases,
caches or testing containers.
dmstr/docker-php-yii2
PHP runtime prepared for Yii 2.0 FrameworkStacks and their service definitions can have different flavours. You may need slightly different setups in development, testing, staging and production environment.
phd supports extending configurations from docker-compose
.
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.
The topmost layer of the stack is the application source-code in /src
. The PHP application is build with
Yii 2.0 Framework.
TODO: Link to Guide, API
The building blocks of the application.
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
See also Yii 2.0 Guide
graph TD
php
test-php
db
mailcatcher
local-browser
selenium-browser
php-->db
test-php-->db
local-browser-->php
local-browser-.->test-php
local-browser-->mailcatcher
selenium-browser-->test-php
vendor
Help us to improve the documentation, fork this page.