$ git clone --branch php81 https://github.com/someson/phalcon5-docker.git .
$ docker-compose up -d --build
- add to your
[...]/etc/hosts
127.0.0.1 phalcon5.test
$ docker-compose exec p5-app composer install
$ php ./scripts/cli.php [handler] [action] [param1] [param2] ... [paramN] -v -r -s
or for docker
$ docker-compose exec [service-name] php ./scripts/cli.php [handler] [action] [param1] [param2] ... [paramN] -v -r -s
Example:
$ docker-compose exec p5-app php ./scripts/cli.php main main -v -r -s
-s
= single instance allowed-v
= verbose info-r
= recording the process into several resources of your choice (MySQL, Logs, ...)
2 aspects to realize:
-dxdebug.mode=debug -dxdebug.client_host=host.docker.internal -dxdebug.client_port=9003 -dxdebug.start_with_request=yes
has to be in called console commanddocker-compose.yml
has to have ENV variable in PHP container:PHP_IDE_CONFIG=serverName=phalcon5.test
, wherephalcon5.test
is your Settings > PHP > Servers > Name value.
where docker host for Windows or Linux:
host.docker.internal
Result:
$ docker-compose exec p5-app php -dxdebug.mode=debug -dxdebug.client_host=host.docker.internal -dxdebug.client_port=9003 -dxdebug.start_with_request=yes ./scripts/cli.php main main -v -s -r
with started listenings for PHP debug connections, certainly.
$ docker-compose exec p5-app vendor/bin/codecept run
if ... did not complete successfully: exit code: 100
$ docker image prune -f