after all this years galering with php debuging i finally manage to get xdebug working, it's the first day of my new dev lifegit add ressources/xdebug.conf.example git add ressources/xdebug.conf.example
This commit is contained in:
parent
c5757c47e2
commit
836e6586b8
2
.env
2
.env
@ -12,3 +12,5 @@ DB_NAME=materio_d8
|
|||||||
DB_LEGACY_NAME=materio_d7
|
DB_LEGACY_NAME=materio_d7
|
||||||
DB_USERNAME=materio
|
DB_USERNAME=materio
|
||||||
DB_PASSWORD=materio
|
DB_PASSWORD=materio
|
||||||
|
|
||||||
|
XDEBUG_CONF=./ressources/xdebug.conf
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ log/*
|
|||||||
*.sql
|
*.sql
|
||||||
bin/syncfiles.sh
|
bin/syncfiles.sh
|
||||||
solr_cores/*
|
solr_cores/*
|
||||||
|
ressources/xdebug.conf
|
||||||
|
@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
mysql-client \
|
mysql-client \
|
||||||
zip \
|
zip \
|
||||||
libzip-dev && \
|
libzip-dev && \
|
||||||
|
cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini && \
|
||||||
# docker-php-ext-install -j$(nproc) iconv && \
|
# docker-php-ext-install -j$(nproc) iconv && \
|
||||||
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
|
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
|
||||||
apt-get install -y imagemagick libmagickwand-dev && \
|
apt-get install -y imagemagick libmagickwand-dev && \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
PS1='\e[36m\e[1mPHP-7.0\e[0m:\e[90m\w\e[0m\n$ '
|
PS1='\e[36m\e[1mPHP-7.3\e[0m:\e[90m\w\e[0m\n$ '
|
||||||
bind '"\e[A": history-search-backward'
|
bind '"\e[A": history-search-backward'
|
||||||
bind '"\e[B": history-search-forward'
|
bind '"\e[B": history-search-forward'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
memory_limit = 2048M
|
memory_limit = 8192M
|
||||||
upload_max_filesize = 50M
|
upload_max_filesize = 50M
|
||||||
post_max_size = 50M
|
post_max_size = 50M
|
||||||
max_execution_time = 150
|
max_execution_time = 150
|
||||||
|
@ -79,18 +79,23 @@ services:
|
|||||||
build: ./Docker/php/
|
build: ./Docker/php/
|
||||||
expose:
|
expose:
|
||||||
- 9000
|
- 9000
|
||||||
|
- 9001
|
||||||
user: ${USER_UID}:${USER_GID}
|
user: ${USER_UID}:${USER_GID}
|
||||||
volumes:
|
volumes:
|
||||||
- php-user-data:/home/${USER_UNAME}
|
- php-user-data:/home/${USER_UNAME}
|
||||||
- "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html"
|
- "${PROJECT_ROOT}:/var/www/html/d8.materio.com/public_html"
|
||||||
- "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html"
|
- "${LEGACY_ROOT}:/var/www/html/d7.materio.com/public_html"
|
||||||
- "${LOG_ROOT}/php:/var/log:rw"
|
- "${LOG_ROOT}/php:/var/log:rw"
|
||||||
|
- "${XDEBUG_CONF}:/usr/local/etc/php/conf.d/xdebug.ini"
|
||||||
working_dir: "/var/www/html/d8.materio.com/public_html"
|
working_dir: "/var/www/html/d8.materio.com/public_html"
|
||||||
networks:
|
networks:
|
||||||
- database
|
- database
|
||||||
- redis
|
- redis
|
||||||
- server
|
- server
|
||||||
- solr
|
- solr
|
||||||
|
# extra_hosts:
|
||||||
|
# - "host.docker.internal:192.168.144.4"
|
||||||
|
# - "testhost:192.168.0.21"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
- mysql
|
||||||
- mysql-legacy
|
- mysql-legacy
|
||||||
|
9
ressources/xdebug.conf.example
Normal file
9
ressources/xdebug.conf.example
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[xdebug]
|
||||||
|
xdebug.remote_enable=1
|
||||||
|
xdebug.remote_host=172.20.0.1 # Should use host.docker.internal but not working on linux
|
||||||
|
xdebug.remote_connect_back=0 # Not working on docker context
|
||||||
|
xdebug.remote_port=9001 # 9000 is already bound by php-fpm
|
||||||
|
xdebug.remote_handler=dbgp
|
||||||
|
xdebug.remote_mode=req
|
||||||
|
xdebug.remote_autostart=true
|
||||||
|
xdebug.remote_log=/var/log/xdebug-error.log # Log file is mounted on volume so you can follow it
|
Loading…
x
Reference in New Issue
Block a user