Skip to content

Commit

Permalink
feat Add xdebug extention (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
ucan-lab authored Jul 5, 2022
1 parent 2d62992 commit cc899ce
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-build-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Docker Version
run: docker version

- name: Settings
- name: Docker Compose Settings
run: echo APP_BUILD_TARGET=deploy > .env

- name: Build Docker Images
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/laravel-create-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
- name: Docker Version
run: docker version

- name: Docker Compose Settings
run: echo APP_BUILD_TARGET=development-xdebug > .env

- name: Build Docker Images
run: docker compose build

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/laravel-git-clone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
- name: Docker Version
run: docker version

- name: Docker Compose Settings
run: echo APP_BUILD_TARGET=development-xdebug > .env

- name: Build Docker Images
run: docker compose build

Expand Down
7 changes: 7 additions & 0 deletions infra/docker/php/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ FROM base AS development

COPY ./infra/docker/php/php.development.ini /usr/local/etc/php/php.ini

FROM development AS development-xdebug

RUN pecl install xdebug && \
docker-php-ext-enable xdebug

COPY ./infra/docker/php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

FROM base AS deploy

COPY ./infra/docker/php/php.deploy.ini /usr/local/etc/php/php.ini
Expand Down
7 changes: 7 additions & 0 deletions infra/docker/php/xdebug.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[xdebug]
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_host = host.docker.internal
xdebug.client_port = 9003
xdebug.log = /tmp/xdebug.log
xdebug.idekey = "PHPSTORM"

0 comments on commit cc899ce

Please sign in to comment.