Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

New docker host config, unify mac and linux ini #317

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions assets/docker/docker-compose.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ services:
- ~/.ssh:/root/.ssh
- ~/.aws:/root/.aws
- composer:/root/.composer
extra_hosts:
- "host.docker.internal:host-gateway"

volumes:
composer:
Expand Down
8 changes: 0 additions & 8 deletions assets/docker/etc/php/xdebug-linux.ini

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[xdebug]
zend_extension=xdebug
zend_extension=xdebug.so
xdebug.start_with_request=yes
xdebug.discover_client_host=true
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
xdebug.client_host=host.docker.internal
xdebug.cli_color=2
xdebug.remote_handler=dbgp
xdebug.mode=develop,debug
xdebug.mode=develop,debug
6 changes: 2 additions & 4 deletions src/Command/XdebugCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,16 @@ public function xdebugStart()
{
$this->xdebugCheck();

$platform = getenv("PLATFORM");
$sourceFile = ($platform == 'Darwin') ? 'xdebug-macos.ini' : 'xdebug-linux.ini';
$dktlRoot = Util::getDktlDirectory();
$this->io()->text("Creating new xdebug.ini file for {$platform} platform.");
$this->io()->text("Creating new xdebug.ini file.");

$f = 'src/docker/etc/php/xdebug.ini';
if (file_exists($f)) {
throw new \Exception("File {$f} already exists.");
}

$result = $this->taskWriteToFile($f)
->textFromFile("$dktlRoot/assets/docker/etc/php/$sourceFile")
->textFromFile("$dktlRoot/assets/docker/etc/php/xdebug.ini")
->run();

Util::directoryAndFileCreationCheck($result, $f, $this->io());
Expand Down