[docker]Install and configure xdebug

This commit is contained in:
Ferror 2022-05-13 11:57:59 +02:00
parent 0047ca5f51
commit 2a35337e64
3 changed files with 12 additions and 1 deletions

View file

@ -1,5 +1,7 @@
FROM sylius/standard:1.11-traditional
RUN apt-get update && apt-get install php8.0-xdebug && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& architecture=$(uname -m) \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \

View file

@ -7,3 +7,11 @@ date.timezone=${PHP_DATE_TIMEZONE}
[blackfire]
extension=blackfire.so
blackfire.agent_socket=tcp://blackfire:8307
[xdebug]
xdebug.mode=develop,debug
xdebug.client_host=host.docker.internal
xdebug.start_with_request=trigger
xdebug.client_port=9000
xdebug.discover_client_host=true
xdebug.idekey=${PHP_XDEBUG_IDEKEY}

View file

@ -1,12 +1,13 @@
services:
app:
build:
context: .docker
context: .docker/dev
environment:
APP_ENV: "dev"
DATABASE_URL: "mysql://root:mysql@mysql/sylius_%kernel.environment%?charset=utf8mb4"
# DATABASE_URL: "pgsql://root:postgres@postgres/sylius_%kernel.environment%?charset=utf8" # When using postgres
PHP_DATE_TIMEZONE: "Europe/Warsaw"
PHP_XDEBUG_IDEKEY: "PHPSTORM"
MAILER_URL: "smtp://mailhog:1025"
volumes:
- ./:/app:delegated