From de467c0d4aaf9d54825683a11ec14fc6d9e2e6fe Mon Sep 17 00:00:00 2001 From: Marvin Flock Date: Tue, 17 Jun 2025 21:29:15 +0200 Subject: [PATCH 1/4] feat: add debugging for php in docker --- README.md | 34 +++++++++++++++++++++++++++++++++- docker-compose.yml | 1 + docker/php.ini | 9 +++++++++ package.json | 4 ++-- 4 files changed, 45 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 295d810..03ee378 100644 --- a/README.md +++ b/README.md @@ -40,5 +40,37 @@ joomla specific database prefixes like #__ To set it up, insert into the configuration popup which follows after you enable the framework support: Joomla install path: `./data/joomla_data` JConfig: `./data/joomla_data/configuration.php` +> This works only with mounted volumes. However, mounted volumes will slow down the joomla instance significantly. +> The current setup does not use mounted volumes. +> An alternative would be to download joomla and use that installation - +### Debugging (with Docker/Intellij) +1. Start Docker Container (see above) +2. Create a terminal for that container + ```shell + docker exec -it bash + ``` +3. install xdebug within the container since joomla does not come with xdebug preinstalled + ```shell + pecl install xdebug + ``` +4. restart the container +5. In Intellij Go to [File | Settings | Languages & Frameworks | PHP | Servers](jetbrains://idea/settings?name=Languages+%26+Frameworks--PHP--Servers) and setup your server + + | | | + |----------|-----------| + | name | anything | + | host | localhost | + | port | 8080 | + | debugger | xdebug | + + use the path mapping and map the repo structure to the container content + + | File/Directory | path on server | + |------------------------------------------------------------------|----------------| + | \/com_sportsmanager/src/structure/administrator/components | /var/www/html/administrator/components | + | \/com_sportsmanager/src/structure/components | /var/www/html/components | +6. Click on "Start Listening for PHP Debug Connections" in the top row of intellij +7. (Not sure if optional) Install a browser extension by Jetbrains +https://chromewebstore.google.com/detail/xdebug-helper-by-jetbrain/aoelhdemabeimdhedkidlnbkfhnhgnhm + diff --git a/docker-compose.yml b/docker-compose.yml index e708437..9babe58 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,6 +30,7 @@ services: MYSQL_USER: joomla MYSQL_PASSWORD: examplepass MYSQL_RANDOM_ROOT_PASSWORD: '1' + TZ: Europe/Berlin volumes: - joomla_database:/var/lib/mysql networks: diff --git a/docker/php.ini b/docker/php.ini index 28dd9eb..b312912 100644 --- a/docker/php.ini +++ b/docker/php.ini @@ -1924,3 +1924,12 @@ opcache.file_cache = /tmp/opcache_file ; List of headers files to preload, wildcard patterns allowed. ;ffi.preload= + +zend_extension=xdebug.so +xdebug.mode=debug +xdebug.start_with_request=yes +xdebug.client_host=host.docker.internal +xdebug.client_port=9003 +xdebug.log=/tmp/xdebug.log +xdebug.discover_client_host=false +xdebug.log_level=7 diff --git a/package.json b/package.json index f9e082e..139b6f7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sportsmanager", "description": "", - "version": "0.0.1", + "version": "2.0.0", "scripts": { "boilerplate": "cross-env NODE_ENV=development gulp boilerplate", "build": "cross-env NODE_ENV=production gulp build", @@ -16,7 +16,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/nielsnuebel/com_sportsmanager.git" + "url": "https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git" }, "keywords": [], "author": { From 455f845ab0cdc101005ba18ca06a58f52cb6457e Mon Sep 17 00:00:00 2001 From: MarvinF Date: Wed, 25 Jun 2025 01:21:52 +0200 Subject: [PATCH 2/4] Update build_release.yml --- .github/workflows/build_release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 2053e30..0c9a999 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -30,6 +30,7 @@ jobs: uses: release-drafter/release-drafter@v6 with: config-name: release-drafter_extension.yml + version: ${{ github.ref_name }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 31b8e5251ea57b74889de355bc5f9085cbc1c20f Mon Sep 17 00:00:00 2001 From: MarvinF Date: Wed, 25 Jun 2025 01:22:57 +0200 Subject: [PATCH 3/4] Update release-drafter_extension.yml --- .github/release-drafter_extension.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-drafter_extension.yml b/.github/release-drafter_extension.yml index 07ba32f..93112a1 100644 --- a/.github/release-drafter_extension.yml +++ b/.github/release-drafter_extension.yml @@ -18,7 +18,7 @@ categories: change-template: "- $TITLE [#$NUMBER]" template: | - # Release $COMPLETE + # Release $RESOLVED_VERSION ## Changes From 9289843cb18b1e287f193971f89e360cbd0ab9c5 Mon Sep 17 00:00:00 2001 From: MarvinF Date: Wed, 25 Jun 2025 17:19:33 +0200 Subject: [PATCH 4/4] Update README.md --- README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index fd97bdd..417dbe8 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,14 @@ ## DEV/STAGE environments -| LV | HOSTER | DOMAIN | BRANCH | -| ------ | -------- | ------------------------------------------------------------ | ------------------ | -| DTFB | Kicktemp | [stage.dtfb.de](https://stage.dtfb.de) | dev | -| TFVHH | Kicktemp | [stage.kickern-hamburg.de](https://stage.kickern-hamburg.de) | dev | -| STFVH | DTFB | [stage.stfv.de](https://stage.stfv.de/) | sportsmanager2-dev | +| LV | HOSTER | DOMAIN | BRANCH | +| ------ | -------- | ------------------------------------------------------------ | -------------------- | +| DTFB | Kicktemp | [stage.dtfb.de](https://stage.dtfb.de) | dev | +| TFVHH | Kicktemp | [stage.kickern-hamburg.de](https://stage.kickern-hamburg.de) | dev | +| STFVH | DTFB | [stage.stfv.de](https://stage.stfv.de/) | sportsmanager2-stage | +| MTFV | DTFB | [stage.mtfv.de](https://stage.mtfv.de/) | ? | +| TFVSH | DTFB | [relaunch.tfvsh.de](https://relaunch.tfvsh.de) | ? | + ## PROD environments @@ -72,12 +75,13 @@ JConfig: `./data/joomla_data/configuration.php` use the path mapping and map the repo structure to the container content - | File/Directory | path on server | - |------------------------------------------------------------------|----------------| + | File/Directory | path on server | + |------------------------------------------------------------------|----------------------------------------| | \/com_sportsmanager/src/structure/administrator/components | /var/www/html/administrator/components | - | \/com_sportsmanager/src/structure/components | /var/www/html/components | -6. Click on "Start Listening for PHP Debug Connections" in the top row of intellij -7. (Not sure if optional) Install a browser extension by Jetbrains + | \/com_sportsmanager/src/structure/components | /var/www/html/components | + +7. Click on "Start Listening for PHP Debug Connections" in the top row of intellij +8. (Not sure if optional) Install a browser extension by Jetbrains https://chromewebstore.google.com/detail/xdebug-helper-by-jetbrain/aoelhdemabeimdhedkidlnbkfhnhgnhm =======