forked from ankitpokhrel/tus-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Configure xdebug (ankitpokhrel#294)
- Loading branch information
1 parent
f361297
commit bcb4119
Showing
8 changed files
with
68 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ infection.json.dist | |
infection-log.txt | ||
.DS_Store | ||
composer.lock | ||
*.cache | ||
|
||
/coverage/ | ||
/vendor/ | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ LABEL maintainer="[email protected],[email protected]" \ | |
|
||
ENV LANG C.UTF-8 | ||
ENV LC_ALL C.UTF-8 | ||
ENV PHP_INI_DIR /etc/php/7.3 | ||
ENV COMPOSER_ALLOW_SUPERUSER 1 | ||
|
||
ADD https://repos.php.earth/alpine/phpearth.rsa.pub /etc/apk/keys/phpearth.rsa.pub | ||
|
||
|
@@ -22,17 +24,15 @@ RUN apk update && apk add --no-cache \ | |
php7.3-pear \ | ||
composer | ||
|
||
# Install APCu extension | ||
RUN pecl upgrade apcu | ||
# Install APCu and Xdebug extension. | ||
RUN pecl upgrade apcu xdebug | ||
|
||
## Xdebug Installation, Currently Alpine repo is missing Php7.4-xdebug, | ||
# RUN apk add --no-cache php7.4-xdebug | ||
COPY ./bin/xdebug.sh /bin/xdebug | ||
RUN chmod +x /bin/xdebug | ||
|
||
COPY ./configs/nginx.conf /etc/nginx/nginx.conf | ||
|
||
ENV PHP_INI_DIR /etc/php/7.3 | ||
|
||
COPY ./configs/php.ini $PHP_INI_DIR/php.ini | ||
COPY ./configs/xdebug.ini $PHP_INI_DIR/conf.d/00_xdebug.disable | ||
COPY ./configs/www.conf $PHP_INI_DIR/php-fpm.d/www.conf | ||
|
||
ENTRYPOINT [ "sh" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
|
||
XDEBUG_CONFIG=/etc/php/7.3/conf.d/00_xdebug | ||
|
||
enable() | ||
{ | ||
if [[ -f ${XDEBUG_CONFIG}.disable ]]; then | ||
mv ${XDEBUG_CONFIG}.disable ${XDEBUG_CONFIG}.ini; | ||
echo "Xdebug enabled"; | ||
fi | ||
} | ||
|
||
disable() | ||
{ | ||
if [[ -f ${XDEBUG_CONFIG}.ini ]]; then | ||
mv ${XDEBUG_CONFIG}.ini ${XDEBUG_CONFIG}.disable; | ||
echo "Xdebug disabled"; | ||
fi | ||
} | ||
|
||
case "$1" in | ||
(enable) | ||
enable | ||
exit 0 | ||
;; | ||
(disable) | ||
disable | ||
exit 0 | ||
;; | ||
(*) | ||
echo "Usage: $0 {enable|disable}" | ||
exit 2 | ||
;; | ||
esac |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
zend_extension = xdebug.so | ||
xdebug.remote_enable = 1 | ||
xdebug.remote_autostart = 1 | ||
xdebug.remote_host = host.docker.internal | ||
xdebug.remote_port = 9999 | ||
xdebug.profiler_enable_trigger = 1 | ||
xdebug.profiler_output_dir = /var/log/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