Skip to content

szabacsik/webstack

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
www
 
 
 
 
 
 
 
 
 
 

Dependencies

It is possible to install both with Chocolatey Package Manager for Windows.
https://chocolatey.org/docs/installation

choco install virtualbox
choco install vagrant

Spin up Webstack virtual machine

mkdir project
cd project
git clone https://github.com/szabacsik/webstack
cd webstack
vagrant up

Start docker containers

vagrant ssh
cd /srv/infra
docker-compose up -d

Access web interfaces

Debugging PHP Containers with XDebug

Start DBGp Proxy Tool on Webstack VM. It listens for container's debugger connections on the port 9001, and listens for developers' IDE on the port 9000.

/opt/dbgpProxy -i 0.0.0.0:9000 -s 0.0.0.0:9001
  • -i: the host and the port to listen on for IDE (client) connections
  • -s: the host and the port to listen on for debugger engine (server) connections

Configure access to the DBGp proxy server from PhpStorm

In the main menu, select Tools | DBGp Proxy | Configuration.

In the DBGP Proxy dialog that opens, specify the
IDE key: PHPSTORM
host: 192.168.100.100
port: 9000
of the Xdebug proxy server.

In the main menu, click Tools | DBGp Proxy | Register IDE.

click Start Listening for PHP Debug Connections

https://www.jetbrains.com/help/phpstorm/multiuser-debugging-via-xdebug-proxies.html https://xdebug.org/docs/dbgpProxy

Debugging a PHP CLI script from the command line of a container

Start Screen session

screen

Start DBGp Proxy Tool and start listening for debug connections in PHPStorm.

Press CTRL+a than c to create a new screen shell window.

Start SSH Server and log into the container. The root password is PASSWORD.

docker exec -it -u0 php7412 /etc/init.d/ssh start
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' php7412
ssh root@172.18.0.4

Go to your app and run a cli script

cd /var/www/html/demo
php index.php

About

Vagrant virtual environment with collections of modern services and tools for web development

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published