12/13/2023 0 Comments Docker4drupalThis will be used when it fails to resolve the client host IP. # Solution for the problem described aboveĪs a bonus, you can also set the xdebug.client_host setting which translates to your host machine IP address as a fallback. Updated docker-compose.yml should look like this: services: The important change is the XDEBUG_CONFIG variable which enables the xdebug.discover_client_host. This setting can be overridden in the docker-compose.yml where PHP service environment variables are set. In my case, this setting was disabled by default. The solution to this problem is setting xdebug.discover_client_host. As the log message from above describes Docker is trying to send debug information to the localhost which does not make sense. Since my PHPStorm was still configured to port 9000, I had to change it. It turns out that the latest version of xdebug is using port 9003 port by default instead of 9000. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-( Investigating PHP container logs, revealed the following message: Xdebug: Could not connect to debugging client. This needs some special attention too.Recently I have upgraded my Docker4Drupal environment while xdebug in PHPStorm stopped working for me. Also, because I’m using a Mac, I need to use something called docker-sync. I’ll get to a more specific setup with more than one project in a later post. Since all the folders are on my local machine, I don’t need the VM anymore and I can connect to my git repositories at work while using the VPN connection. Now you go to (change URL to the one used in. Once you have completed the configuration, you can start your container: You can make choises about the versions for all the components in the other tags. env file and make the necessary changes, starting with the project name and URL. Then copy the Docker4Drupal stuff in the project folder: I found this very instructive video:, I’ll describe it below.Ĭomposer create-project drupal-composer/drupal-project:8.x-dev project_name -no-interaction (this creates a project in the folder project_name - clone drupal-project - and runs composer install make sure to rename the project name)īecause you don’t need the git repository stuff: I’ll start with basic installation and will get to a more sophisticated setup in a later post. There is a plethora of other tools you can choose from, like Redis, Varnish or Memcached for caching, Solr, Elasticsearch and Kibana for search, and a lot more. You can choose Nginx or Apache, Mariadb or Postgres, Drupal 7 or 8, PHP 7.2, 7.3 or 7.4. We have utilized the docker4drupal project and. It took some figuring out, especially getting multiple projects to work next to one another, but I got it working.ĭocker4Drupal is a Docker-based Drupal stack: a set of docker images optimized for Drupal. Both the Data Portal and the Indicator Reporting Tool are built on top of Drupal. This makes pushing and pulling to/from the git repositories cumbersome. I can only connect to the git repositories at work using a VPN connection, but when I start the VPN connection I cannot connect to my VM anymore. Now that I’m working from home I faced a problem. When I was working at the office this is just fine, apart from the fact that it is somewhat slow: I start the VM, wait for it to finish, then make an SSHFS connection to the VM, start PhpStorm, and wait again for PhpStorm to stop indexing (which is REALLY slow). I have been doing my Drupal development in a virtual machine using Virtualbox for some time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |