Skip to content

Commit 40d3d61

Browse files
author
Móveis Simonetti
authored
Merge pull request #11 from lucassabreu/php7dot3
improv xdebug setup
2 parents 8d11406 + 46c05a5 commit 40d3d61

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ FROM php:7.3-apache
33

44
ENV http_proxy ${HTTP_PROXY}
55
ENV https_proxy ${HTTP_PROXY}
6-
ENV XDEBUG_ENABLED=false
7-
ENV XDEBUG_VERSION="-2.7.0beta1"
86
ENV NR_ENABLED=false
97
ENV NR_APP_NAME=""
108
ENV NR_LICENSE_KEY=""
@@ -14,6 +12,11 @@ ENV PHP_OPCACHE_ENABLED=false
1412
ENV SESSION_HANDLER=false
1513
ENV SESSION_HANDLER_NAME=""
1614
ENV SESSION_HANDLER_PATH=""
15+
ENV XDEBUG_AUTOSTART=false
16+
ENV XDEBUG_CONNECT_BACK=true
17+
ENV XDEBUG_ENABLED=false
18+
ENV XDEBUG_IDEKEY="docker"
19+
ENV XDEBUG_VERSION="-2.7.0beta1"
1720

1821
RUN apt-get update && apt-get install -y wget vim supervisor libfreetype6-dev libjpeg62-turbo-dev \
1922
libmcrypt-dev libpng-dev libssl-dev libaio1 git libcurl4-openssl-dev libxslt-dev \

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
all: build
2+
3+
IMAGE=lojassimonetti/php-apache-oci8-composer
4+
TAG=$(shell git branch | grep \* | cut -d ' ' -f2)
5+
6+
build:
7+
docker build . -t $(IMAGE):$(TAG)
8+
9+
push: build
10+
docker push $(IMAGE):$(TAG)
11+

apache-run.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
if [[ ${XDEBUG_ENABLED} == true ]]; then
44
echo "zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-${PHP_BUILD_DATE}/xdebug.so" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
55
echo "xdebug.var_display_max_depth=5" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
6+
echo "xdebug.idekey=${XDEBUG_IDEKEY}" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
7+
echo "xdebug.remote_enable=1" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
8+
echo "xdebug.remote_port=9000" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
9+
10+
[[ ${XDEBUG_AUTOSTART} == true ]] && {
11+
echo "xdebug.remote_autostart=on" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
12+
} || echo "xdebug.remote_autostart=off" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
13+
14+
[[ ${XDEBUG_CONNECT_BACK} == true ]] && {
15+
echo "xdebug.remote_connect_back=1" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
16+
} || echo "xdebug.remote_connect_back=0" | sudo tee -a /usr/local/etc/php/conf.d/xdebug.ini
617
fi
718

819
if [[ ${NR_ENABLED} == true ]]; then
@@ -24,4 +35,4 @@ sudo rm -rf var/cache/* var/logs/* &&
2435
sudo chown -R www-data:www-data /var/www/html/var/logs && chmod 777 /var/www/html/var/logs &&
2536
sudo chown -R www-data:www-data /var/www/html/var/sessions && chmod 777 /var/www/html/var/sessions
2637

27-
apache2-foreground
38+
exec apache2-foreground

0 commit comments

Comments
 (0)