Neurological Phenomenon Multiplexer
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



    A basic generator for docker4drupal stack that permits easily the generation of a docker4drupal (drupal 7 or 8) project.


    First, install Yeoman and generator-docker4drupal using npm (we assume you have pre-installed node.js).

    $ npm install -g yo
    $ npm install -g generator-docker4drupal


    Generate your new project:

    $ mkdir drupal8
    $ cd drupal 8
    $ yo docker4drupal

    Generated project will contain the following structure:

    +-- certs
    |   +-- cert.pem
    |   +-- key.pem
    +-- docker
    |   +-- docker-compose.yml
    |   +-- docker-sync.yml
    |   +-- examples
    |       +--
    |       +-- settings.local.php
    +-- docroot

    The certs folder provides pre-generated self signed certificates for using https when accessing Drupal.

    The docker/examples folder provides recommended settings for generated Drupal project.

    The docroot folder will be populated with vanilla Drupal from docker4drupal when containers are initialised, if instead custom was used, its required to manual add the Drupal files in docroot/web.

    The bash script file can be used for various operations:

        USAGE: ./ [OPTIONS]
          start       Starts docker-sync and docker-compose containers.
          stop        Stops docker-sync and docker-compose containers.
          shell       Opens a bash shell in the docker php container.
                      Use ./ shell root to run as root.
          status      Display status of running containers.
          hosts       Add container endpoints to /etc/hosts file (requires sudo).
                      Use sudo ./ hosts
          recreate    Recreates all containers (ALL DATA WILL BE ERASED)
          drush       Run drush command inside php container
          reinstall   Forces installation of drupal
          db-backup   Creates a database dump
          db-restore  Restores a database dump
          db-cli      Opens the mysql cli
          help        Display list of useful docker commands.

    When using vanilla option when running ./ start for the first time, Drupal will be automatically installed.

    Getting To Know Yeoman

    • Yeoman has a heart of gold.

    • Yeoman is a person with feelings and opinions, but is very easy to work with.

    • Yeoman can be too opinionated at times but is easily convinced not to be.

    • Feel free to learn more about Yeoman.


    MIT © [Paulo Gomes]


    npm i generator-docker4drupal

    Downloadslast 7 days







    last publish


    • avatar