Last active
November 25, 2023 19:58
-
-
Save DominikStyp/7de2527601ba10b38103e3d1ffd50923 to your computer and use it in GitHub Desktop.
Laravel Sail + Docker: restart web container with enabled Xdebug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONTAINER_NAME="web" | |
echo "Stopping the web container..." | |
./vendor/bin/sail stop $CONTAINER_NAME | |
echo "Disabling Xdebug and setting mode to debug,develop..." | |
./vendor/bin/sail exec $CONTAINER_NAME bash -c "echo 'xdebug.mode=off' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini" | |
echo "Restarting PHP service in the container..." | |
./vendor/bin/sail exec $CONTAINER_NAME service php8.2-fpm restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONTAINER_NAME="web" | |
echo "Stopping the web container..." | |
./vendor/bin/sail stop $CONTAINER_NAME | |
echo "Enabling Xdebug and setting mode to debug,develop..." | |
./vendor/bin/sail exec $CONTAINER_NAME bash -c "echo 'xdebug.mode=debug,develop' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini" | |
echo "Restarting PHP service in the container..." | |
./vendor/bin/sail exec $CONTAINER_NAME service php8.2-fpm restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment