I have created a new Drupal 8 site with docker. I created it with composer and installed the drupal/deploy
and relaxedws/replicator
modules. The drupal/deploy
module and all of its dependencies seem to be installed correctly, they show up in the Extend
area of Drupal, and they seem to work properly. The relaxedws/replicator
does not show up as expected. I expect to see it in the Web Services section of the Extend page in Drupal.
The relaxedws/replicator
module shows up on the file system in the vendor
folder in the Drupal root.
It seems like I'm missing something.
Dockerfile:
FROM drupal:latest RUN apt-get update && apt-get install -y \ curl \ git \ mysql-client \ vim \ wget RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ php composer-setup.php && \ mv composer.phar /usr/local/bin/composer && \ php -r "unlink('composer-setup.php');" RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.4.2/drush.phar && \ chmod +x drush.phar && \ mv drush.phar /usr/local/bin/drush RUN rm -rf /var/www/html/* COPY apache-drupal.conf /etc/apache2/sites-enabled/000-default.conf WORKDIR /app RUN composer create-project drupal-composer/drupal-project:8.x-dev /app --stability dev --no-interaction RUN mkdir -p /app/config/sync RUN chown -R www-data:www-data /app/web RUN composer require relaxedws/replicator:dev-master RUN composer require drupal/deploy
Resulting composer.json
{ "name": "drupal-composer/drupal-project", "description": "Project template for Drupal 8 projects with composer", "type": "project", "license": "GPL-2.0-or-later", "authors": [ { "name": "", "role": "" } ], "repositories": [ { "type": "composer", "url": "https://packages.drupal.org/8" } ], "require": { "composer/installers": "^1.2", "cweagans/composer-patches": "^1.6", "drupal-composer/drupal-scaffold": "^2.2", "drupal/console": "^1.0.2", "drupal/core": "~8.5.3", "drupal/deploy": "^1.0@beta", "drush/drush": "^9.0.0", "relaxedws/replicator": "dev-master", "vlucas/phpdotenv": "^2.4", "webflo/drupal-finder": "^1.0.0", "webmozart/path-util": "^2.3" }, "require-dev": { "webflo/drupal-core-require-dev": "~8.5.3" }, "conflict": { "drupal/drupal": "*" }, "minimum-stability": "dev", "prefer-stable": true, "config": { "sort-packages": true }, "autoload": { "classmap": [ "scripts/composer/ScriptHandler.php" ], "files": ["load.environment.php"] }, "scripts": { "drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold", "pre-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], "pre-update-cmd": [ "DrupalProject\\composer\\ScriptHandler::checkComposerVersion" ], "post-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" ], "post-update-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" ] }, "extra": { "installer-paths": { "web/core": ["type:drupal-core"], "web/libraries/{$name}": ["type:drupal-library"], "web/modules/contrib/{$name}": ["type:drupal-module"], "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], "drush/contrib/{$name}": ["type:drupal-drush"] } } }
** EDIT 1
I attempted the fix mentioned by @sonfd (and say thanks for the answer). I changed my extra.installer-paths
to the following but the path for the installed package didn't change.
"extra": { "installer-paths": { "web/core": ["type:drupal-core"], "web/libraries/{$name}": ["type:drupal-library"], "web/modules/contrib/{$name}": ["type:drupal-module"], "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], "drush/contrib/{$name}": ["type:drupal-drush"], "web/modules/{$name}": ["relaxedws/replicator"] } }