Skip to content

Commit

Permalink
Merge pull request #314 from piotrkwiecinski/xdebug-reset-phpfpm-only
Browse files Browse the repository at this point in the history
restart only phpfpm to toggle xdebug, rerun of selected service
  • Loading branch information
markshust committed Oct 8, 2020
2 parents 2433585 + 26d6be1 commit fbdc349
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions compose/bin/restart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
bin/stop
bin/start
bin/stop "$@"
bin/start "$@"
2 changes: 1 addition & 1 deletion compose/bin/start
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ done
# Wait to exit until all missing files have been outputted to the user
[ $IS_VALID = false ] && echo "Failed to start docker for missing volume files" && exit

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --remove-orphans
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d --remove-orphans "$@"

## Blackfire support
# ------------------
Expand Down
2 changes: 1 addition & 1 deletion compose/bin/stop
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
docker-compose -f docker-compose.yml -f docker-compose.dev.yml stop
docker-compose -f docker-compose.yml -f docker-compose.dev.yml stop "$@"
4 changes: 2 additions & 2 deletions compose/bin/xdebug
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash
if [ "$1" == "disable" ]; then
bin/cli sed -i -e 's/^zend_extension/\;zend_extension/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
bin/restart
bin/restart phpfpm
echo "Xdebug has been disabled."
elif [ "$1" == "enable" ]; then
bin/cli sed -i -e 's/^\;zend_extension/zend_extension/g' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
bin/restart
bin/restart phpfpm
echo "Xdebug has been enabled."
else
echo "Please specify either 'enable' or 'disable' as an argument"
Expand Down

0 comments on commit fbdc349

Please sign in to comment.