add doc for xdebug for macos,

fix worker cmd
This commit is contained in:
Arthur de Moulins
2020-02-28 17:56:52 +01:00
parent 090ff844e3
commit 34ceffdae0
6 changed files with 12 additions and 7 deletions

2
.env
View File

@@ -59,7 +59,7 @@ XDEBUG_ENABLED=1
XDEBUG_PROFILER_ENABLED=0 XDEBUG_PROFILER_ENABLED=0
IDE_KEY=PHPSTORM IDE_KEY=PHPSTORM
PHRASEANET_SUBNET_IPS=172.32.0.0/16 PHRASEANET_SUBNET_IPS=172.32.0.0/16
PHRASEANET_GATEWAY_IP=172.32.0.1 XDEBUG_REMOTE_HOST=172.32.0.1
PHP_IDE_CONFIG=serverName=docker-server-phraseanet PHP_IDE_CONFIG=serverName=docker-server-phraseanet
# Volumes location for dev # Volumes location for dev

View File

@@ -116,7 +116,7 @@ CMD ["php-fpm", "-F"]
FROM phraseanet-fpm as phraseanet-worker FROM phraseanet-fpm as phraseanet-worker
ENTRYPOINT ["docker/phraseanet/worker/entrypoint.sh"] ENTRYPOINT ["docker/phraseanet/worker/entrypoint.sh"]
CMD ["docker/phraseanet/worker/scheduler-run.sh"] CMD ["bin/console", "task-manager:scheduler:run"]
######################################################################### #########################################################################
# phraseanet-nginx # phraseanet-nginx

View File

@@ -112,6 +112,14 @@ For PhpStorm, you can follow this example:
> Configure the `Absolute path on the server` to `/var/alchemy/Phraseanet` at the project root path (i.e. `~/projects/Phraseanet`). > Configure the `Absolute path on the server` to `/var/alchemy/Phraseanet` at the project root path (i.e. `~/projects/Phraseanet`).
#### Xdebug on MacOS
You have to set the following env:
```bash
XDEBUG_REMOTE_HOST=host.docker.internal
```
> Don't forget to recreate your container (`docker-compose up -d phraseanet`)
# With Vagrant (deprecated) # With Vagrant (deprecated)

View File

@@ -30,7 +30,7 @@ services:
phraseanet: phraseanet:
environment: environment:
- XDEBUG_ENABLED - XDEBUG_ENABLED
- XDEBUG_CONFIG=remote_host=${PHRASEANET_GATEWAY_IP} idekey=${IDE_KEY} remote_enable=1 profiler_enable=${XDEBUG_PROFILER_ENABLED} profiler_output_dir=/var/alchemy/Phraseanet/cache/profiler - XDEBUG_CONFIG=remote_host=${XDEBUG_REMOTE_HOST} idekey=${IDE_KEY} remote_enable=1 profiler_enable=${XDEBUG_PROFILER_ENABLED} profiler_output_dir=/var/alchemy/Phraseanet/cache/profiler
- PHP_IDE_CONFIG - PHP_IDE_CONFIG
volumes: volumes:
- .:/var/alchemy/Phraseanet - .:/var/alchemy/Phraseanet

View File

@@ -15,4 +15,4 @@ if [ ${XDEBUG_ENABLED} == "1" ]; then
docker-php-ext-enable xdebug docker-php-ext-enable xdebug
fi fi
bash -e docker-php-entrypoint $@ runuser -u app "$@"

View File

@@ -1,3 +0,0 @@
#!/bin/bash
runuser app -c 'php bin/console task-manager:scheduler:run'