contenta_docker icon indicating copy to clipboard operation
contenta_docker copied to clipboard

Drush is required to install composer

Open mrleblanc101 opened this issue 6 years ago • 7 comments

Hi, I've followed the instruction exactly but I get:

» docker-compose exec php composer run-script install:with-mysql
> scripts/install-mysql.sh
./scripts/install.sh: line 23: /var/www/vendor/drush/drush/drush
: No such file or directory
 ERROR  Drush is required to install Contenta CMS. Please install Contenta CMS using Composer. See http://www.contentacms.org/#install
Script scripts/install-mysql.sh handling the install:with-mysql event returned with error code 5

Drush is installed correctly in the vendor directory and the path to it in the script seem ok. capture d ecran le 2019-02-04 a 17 16 18 Someone has an idea ?

mrleblanc101 avatar Feb 04 '19 22:02 mrleblanc101

Seem like it used my local composer. I had to composer global remove drush/drush Is this a bug ? Shouldn't it use the composer in the docker container ?

mrleblanc101 avatar Feb 04 '19 22:02 mrleblanc101

Maybe @pcambra knows the answer to the question above ☝️.

e0ipso avatar Feb 08 '19 11:02 e0ipso

I'm running into this issue as well. An inspection inside the running container confirms that it missing the nested /vender/drush/drush folder in /var/www. Anyone have any thoughts on how to remedy this?

MykaMart avatar Jul 25 '19 00:07 MykaMart

Same issue here. Working on it today. If I resolve it, I'll submit a PR.

trevortwining avatar Aug 07 '19 14:08 trevortwining

I've updated both composer and moved to a more modern mode to install drush using cgr on https://github.com/contentacms/contenta_docker/commit/80a41a1f2506636e5fcd3daf3e45b7cc14165b9b, could you confirm this is fixed?

pcambra avatar Sep 18 '19 15:09 pcambra

It was not, Contenta was still unable to find drush where it was expecting it during the install.

I have created a pull request that solves the issue. The new Dockerfile creates the folder structure the installer is expecting and creates a symlink between the new folder and drush.

I have tested this fix and was able to complete the install.

MykaMart avatar Nov 17 '19 23:11 MykaMart

I must be missing something because according to the commit above and this https://github.com/contentacms/contenta_jsonapi/commit/a8cd75b38e42575460d2875f30a829eb186b21d2, there should not be a need for global drush, maybe we should explore why local drush is not being run

pcambra avatar Nov 18 '19 12:11 pcambra