mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 06:27:52 +00:00
feat: add debugging for php in docker
This commit is contained in:
@@ -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 <container_name> 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 |
|
||||
|------------------------------------------------------------------|----------------|
|
||||
| \<path>/com_sportsmanager/src/structure/administrator/components | /var/www/html/administrator/components |
|
||||
| \<path>/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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user