Creating a new latest-Drupal project with local-Drush, with all desired credentials in one go?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I use Ubuntu 18.04 with Bash and Apache 2.4 and I desire to automate the entire process of creating a Drupal 8 with local Drush 9 project, at least after creating a database for it (which I usually create with PHPMyAdmin):



  1. Add data like domain.tld, db name, db user name, db password and locality (localhost).

  2. Create an Apache Virtual Host for the Drupal project based on the domain.

  3. Download and create a Drupal directory for the project under /var/www/html/.

  4. Change the directory's name to that of the domain and also create a proper settings.php with the relevant details.

  5. Restart the server.

I don't think the following Composer command is enough for that:



composer create-project drupal-composer/drupal-project


Is there a communally-supported way to achieve my aim?









share













migrated from drupal.stackexchange.com 13 mins ago


This question came from our site for Drupal developers and administrators.














  • My apologies, yes that's possible. Exactly how you download it depends on your desired workflow (drupal-project is the most common, and more robust, but you can just drush dl drupal too if you want). Installation is done via drush site-install. drush si --help will give you the available parameters for that process
    – Clive
    yesterday






  • 2




    I can't comment on the votes (wasn't involved), but as we chatted about earlier, this just isn't the place to learn about Ansible, Vagrant, Docker, virtualisation, etc, regardless of whether you plan to use those technologies with Drupal. It's like asking a car mechanic to explain how the machines that produce cars work - they may be able to explain it, they may even have had experience using or building one, but they don't want to talk about that...they want to talk about fixing and maintaining cars. They assume that when you come to them, you already have a car
    – Clive
    20 hours ago










  • I think this is a false analogy because a Drupal developer (which as of 2018 I'm not) usually automates creation of Drupal projects. The concept of automation came time and again in Drupal conferences I were in... Docker and Asnible were heard of time and again in the lectures.
    – JohnDoea
    20 hours ago






  • 2




    The analogy is clumsy, definitely, but not false in my opinion. To be honest the only point I'm making is that you won't be able to learn how to use Docker, Ansible, Vagrant, etc, here, because that's not what this site is for. You'll no doubt find snippets and configurations to use with these technologies, even links to full projects like in a couple of the answers here, but you'll need to learn how to apply that piecemeal logic the way the rest of us did - in the documentation pages of each technology :)
    – Clive
    20 hours ago






  • 2




    I think if you are just getting started with devops, your best bet is to learn Docker since we're nearly at 2019. Volumes of docs out there for that. Also i think you are conflating Drush and Composer, which are two different tools. You can use Composer to scaffold out and control a Drupal project (see Drupal Composer or Acquia BLT), but neither require drush. Drush can be added to the project via Composer.
    – Kevin
    16 hours ago














up vote
0
down vote

favorite












I use Ubuntu 18.04 with Bash and Apache 2.4 and I desire to automate the entire process of creating a Drupal 8 with local Drush 9 project, at least after creating a database for it (which I usually create with PHPMyAdmin):



  1. Add data like domain.tld, db name, db user name, db password and locality (localhost).

  2. Create an Apache Virtual Host for the Drupal project based on the domain.

  3. Download and create a Drupal directory for the project under /var/www/html/.

  4. Change the directory's name to that of the domain and also create a proper settings.php with the relevant details.

  5. Restart the server.

I don't think the following Composer command is enough for that:



composer create-project drupal-composer/drupal-project


Is there a communally-supported way to achieve my aim?









share













migrated from drupal.stackexchange.com 13 mins ago


This question came from our site for Drupal developers and administrators.














  • My apologies, yes that's possible. Exactly how you download it depends on your desired workflow (drupal-project is the most common, and more robust, but you can just drush dl drupal too if you want). Installation is done via drush site-install. drush si --help will give you the available parameters for that process
    – Clive
    yesterday






  • 2




    I can't comment on the votes (wasn't involved), but as we chatted about earlier, this just isn't the place to learn about Ansible, Vagrant, Docker, virtualisation, etc, regardless of whether you plan to use those technologies with Drupal. It's like asking a car mechanic to explain how the machines that produce cars work - they may be able to explain it, they may even have had experience using or building one, but they don't want to talk about that...they want to talk about fixing and maintaining cars. They assume that when you come to them, you already have a car
    – Clive
    20 hours ago










  • I think this is a false analogy because a Drupal developer (which as of 2018 I'm not) usually automates creation of Drupal projects. The concept of automation came time and again in Drupal conferences I were in... Docker and Asnible were heard of time and again in the lectures.
    – JohnDoea
    20 hours ago






  • 2




    The analogy is clumsy, definitely, but not false in my opinion. To be honest the only point I'm making is that you won't be able to learn how to use Docker, Ansible, Vagrant, etc, here, because that's not what this site is for. You'll no doubt find snippets and configurations to use with these technologies, even links to full projects like in a couple of the answers here, but you'll need to learn how to apply that piecemeal logic the way the rest of us did - in the documentation pages of each technology :)
    – Clive
    20 hours ago






  • 2




    I think if you are just getting started with devops, your best bet is to learn Docker since we're nearly at 2019. Volumes of docs out there for that. Also i think you are conflating Drush and Composer, which are two different tools. You can use Composer to scaffold out and control a Drupal project (see Drupal Composer or Acquia BLT), but neither require drush. Drush can be added to the project via Composer.
    – Kevin
    16 hours ago












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I use Ubuntu 18.04 with Bash and Apache 2.4 and I desire to automate the entire process of creating a Drupal 8 with local Drush 9 project, at least after creating a database for it (which I usually create with PHPMyAdmin):



  1. Add data like domain.tld, db name, db user name, db password and locality (localhost).

  2. Create an Apache Virtual Host for the Drupal project based on the domain.

  3. Download and create a Drupal directory for the project under /var/www/html/.

  4. Change the directory's name to that of the domain and also create a proper settings.php with the relevant details.

  5. Restart the server.

I don't think the following Composer command is enough for that:



composer create-project drupal-composer/drupal-project


Is there a communally-supported way to achieve my aim?









share













I use Ubuntu 18.04 with Bash and Apache 2.4 and I desire to automate the entire process of creating a Drupal 8 with local Drush 9 project, at least after creating a database for it (which I usually create with PHPMyAdmin):



  1. Add data like domain.tld, db name, db user name, db password and locality (localhost).

  2. Create an Apache Virtual Host for the Drupal project based on the domain.

  3. Download and create a Drupal directory for the project under /var/www/html/.

  4. Change the directory's name to that of the domain and also create a proper settings.php with the relevant details.

  5. Restart the server.

I don't think the following Composer command is enough for that:



composer create-project drupal-composer/drupal-project


Is there a communally-supported way to achieve my aim?







untagged





share












share










share



share










asked yesterday









JohnDoea

127831




127831




migrated from drupal.stackexchange.com 13 mins ago


This question came from our site for Drupal developers and administrators.






migrated from drupal.stackexchange.com 13 mins ago


This question came from our site for Drupal developers and administrators.













  • My apologies, yes that's possible. Exactly how you download it depends on your desired workflow (drupal-project is the most common, and more robust, but you can just drush dl drupal too if you want). Installation is done via drush site-install. drush si --help will give you the available parameters for that process
    – Clive
    yesterday






  • 2




    I can't comment on the votes (wasn't involved), but as we chatted about earlier, this just isn't the place to learn about Ansible, Vagrant, Docker, virtualisation, etc, regardless of whether you plan to use those technologies with Drupal. It's like asking a car mechanic to explain how the machines that produce cars work - they may be able to explain it, they may even have had experience using or building one, but they don't want to talk about that...they want to talk about fixing and maintaining cars. They assume that when you come to them, you already have a car
    – Clive
    20 hours ago










  • I think this is a false analogy because a Drupal developer (which as of 2018 I'm not) usually automates creation of Drupal projects. The concept of automation came time and again in Drupal conferences I were in... Docker and Asnible were heard of time and again in the lectures.
    – JohnDoea
    20 hours ago






  • 2




    The analogy is clumsy, definitely, but not false in my opinion. To be honest the only point I'm making is that you won't be able to learn how to use Docker, Ansible, Vagrant, etc, here, because that's not what this site is for. You'll no doubt find snippets and configurations to use with these technologies, even links to full projects like in a couple of the answers here, but you'll need to learn how to apply that piecemeal logic the way the rest of us did - in the documentation pages of each technology :)
    – Clive
    20 hours ago






  • 2




    I think if you are just getting started with devops, your best bet is to learn Docker since we're nearly at 2019. Volumes of docs out there for that. Also i think you are conflating Drush and Composer, which are two different tools. You can use Composer to scaffold out and control a Drupal project (see Drupal Composer or Acquia BLT), but neither require drush. Drush can be added to the project via Composer.
    – Kevin
    16 hours ago
















  • My apologies, yes that's possible. Exactly how you download it depends on your desired workflow (drupal-project is the most common, and more robust, but you can just drush dl drupal too if you want). Installation is done via drush site-install. drush si --help will give you the available parameters for that process
    – Clive
    yesterday






  • 2




    I can't comment on the votes (wasn't involved), but as we chatted about earlier, this just isn't the place to learn about Ansible, Vagrant, Docker, virtualisation, etc, regardless of whether you plan to use those technologies with Drupal. It's like asking a car mechanic to explain how the machines that produce cars work - they may be able to explain it, they may even have had experience using or building one, but they don't want to talk about that...they want to talk about fixing and maintaining cars. They assume that when you come to them, you already have a car
    – Clive
    20 hours ago










  • I think this is a false analogy because a Drupal developer (which as of 2018 I'm not) usually automates creation of Drupal projects. The concept of automation came time and again in Drupal conferences I were in... Docker and Asnible were heard of time and again in the lectures.
    – JohnDoea
    20 hours ago






  • 2




    The analogy is clumsy, definitely, but not false in my opinion. To be honest the only point I'm making is that you won't be able to learn how to use Docker, Ansible, Vagrant, etc, here, because that's not what this site is for. You'll no doubt find snippets and configurations to use with these technologies, even links to full projects like in a couple of the answers here, but you'll need to learn how to apply that piecemeal logic the way the rest of us did - in the documentation pages of each technology :)
    – Clive
    20 hours ago






  • 2




    I think if you are just getting started with devops, your best bet is to learn Docker since we're nearly at 2019. Volumes of docs out there for that. Also i think you are conflating Drush and Composer, which are two different tools. You can use Composer to scaffold out and control a Drupal project (see Drupal Composer or Acquia BLT), but neither require drush. Drush can be added to the project via Composer.
    – Kevin
    16 hours ago















My apologies, yes that's possible. Exactly how you download it depends on your desired workflow (drupal-project is the most common, and more robust, but you can just drush dl drupal too if you want). Installation is done via drush site-install. drush si --help will give you the available parameters for that process
– Clive
yesterday




My apologies, yes that's possible. Exactly how you download it depends on your desired workflow (drupal-project is the most common, and more robust, but you can just drush dl drupal too if you want). Installation is done via drush site-install. drush si --help will give you the available parameters for that process
– Clive
yesterday




2




2




I can't comment on the votes (wasn't involved), but as we chatted about earlier, this just isn't the place to learn about Ansible, Vagrant, Docker, virtualisation, etc, regardless of whether you plan to use those technologies with Drupal. It's like asking a car mechanic to explain how the machines that produce cars work - they may be able to explain it, they may even have had experience using or building one, but they don't want to talk about that...they want to talk about fixing and maintaining cars. They assume that when you come to them, you already have a car
– Clive
20 hours ago




I can't comment on the votes (wasn't involved), but as we chatted about earlier, this just isn't the place to learn about Ansible, Vagrant, Docker, virtualisation, etc, regardless of whether you plan to use those technologies with Drupal. It's like asking a car mechanic to explain how the machines that produce cars work - they may be able to explain it, they may even have had experience using or building one, but they don't want to talk about that...they want to talk about fixing and maintaining cars. They assume that when you come to them, you already have a car
– Clive
20 hours ago












I think this is a false analogy because a Drupal developer (which as of 2018 I'm not) usually automates creation of Drupal projects. The concept of automation came time and again in Drupal conferences I were in... Docker and Asnible were heard of time and again in the lectures.
– JohnDoea
20 hours ago




I think this is a false analogy because a Drupal developer (which as of 2018 I'm not) usually automates creation of Drupal projects. The concept of automation came time and again in Drupal conferences I were in... Docker and Asnible were heard of time and again in the lectures.
– JohnDoea
20 hours ago




2




2




The analogy is clumsy, definitely, but not false in my opinion. To be honest the only point I'm making is that you won't be able to learn how to use Docker, Ansible, Vagrant, etc, here, because that's not what this site is for. You'll no doubt find snippets and configurations to use with these technologies, even links to full projects like in a couple of the answers here, but you'll need to learn how to apply that piecemeal logic the way the rest of us did - in the documentation pages of each technology :)
– Clive
20 hours ago




The analogy is clumsy, definitely, but not false in my opinion. To be honest the only point I'm making is that you won't be able to learn how to use Docker, Ansible, Vagrant, etc, here, because that's not what this site is for. You'll no doubt find snippets and configurations to use with these technologies, even links to full projects like in a couple of the answers here, but you'll need to learn how to apply that piecemeal logic the way the rest of us did - in the documentation pages of each technology :)
– Clive
20 hours ago




2




2




I think if you are just getting started with devops, your best bet is to learn Docker since we're nearly at 2019. Volumes of docs out there for that. Also i think you are conflating Drush and Composer, which are two different tools. You can use Composer to scaffold out and control a Drupal project (see Drupal Composer or Acquia BLT), but neither require drush. Drush can be added to the project via Composer.
– Kevin
16 hours ago




I think if you are just getting started with devops, your best bet is to learn Docker since we're nearly at 2019. Volumes of docs out there for that. Also i think you are conflating Drush and Composer, which are two different tools. You can use Composer to scaffold out and control a Drupal project (see Drupal Composer or Acquia BLT), but neither require drush. Drush can be added to the project via Composer.
– Kevin
16 hours ago










3 Answers
3






active

oldest

votes

















up vote
3
down vote













Have you already had a look at the ScriptHandler.php of drupal-composer/drupal-project?



It provides certain functions that are run via composer.json as post-install-cmd and post-update-cmd. You could extend the ScriptHandler.php to provide a post-create-project-cmd which runs your Drush stuff. Maybe with the help of Symfony's Console Component.






share|improve this answer




















  • Sadly I should first take some PHP and Drupal-programming courses before I could comfortably understand what's going there. I know no programming besides some fundamental vanilla Bash and JS.
    – JohnDoea
    yesterday

















up vote
2
down vote













I know it's not a perfect fit to your question, but one option is to start with geerlingguys Drupal Vagrant Box:



https://github.com/geerlingguy/drupal-vm



With this, you can set a custom config.yml to override the default.config.yml which will allow you to set variables/info such as DB name, DB pass, MySQL user, Site name, etc... It gets you pretty close to an all in one "up" kind of thing.



You can tell vagrant to install a DB or not. Install Drupal or not. You can have it use an existing DB on "up" command too.



Some example config.yml overrides (not tested):



---

vagrant_hostname: site_name.local
vagrant_machine_name: site_name_vm
drupal_site_name: "site_name"
drupal_account_pass: pass
drupal_db_name: site_name
php_version: "7.1"

vagrant_ip: 192.168.25.25
vagrant_memory: 4096

extra_packages:
- sqlite
- php-bcmath # This is needed for Commerce.

php_memory_limit: "256M"
php_display_errors: "On"
mysql_root_password: pass
drupal_account_name: admin
drupal_db_user: root
drupal_db_password: pass


Then it's just a matter of running vagrant up in your command line and it's possible to have vagrant install Drupal with DB and all creds/info.




You can take a look at the default.config.yml to see what's available and what you may want to override/set.






share|improve this answer



























    up vote
    2
    down vote













    Consider using dbjpanda's drupal-on-docker; simple installation with everything automated. You just have to install docker and then:



    1. Clone the repository.

    2. Update the .env file with all of your information like domain name, db password, etc.

    and you're good to go.






    share|improve this answer




















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "106"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480616%2fcreating-a-new-latest-drupal-project-with-local-drush-with-all-desired-credenti%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      3
      down vote













      Have you already had a look at the ScriptHandler.php of drupal-composer/drupal-project?



      It provides certain functions that are run via composer.json as post-install-cmd and post-update-cmd. You could extend the ScriptHandler.php to provide a post-create-project-cmd which runs your Drush stuff. Maybe with the help of Symfony's Console Component.






      share|improve this answer




















      • Sadly I should first take some PHP and Drupal-programming courses before I could comfortably understand what's going there. I know no programming besides some fundamental vanilla Bash and JS.
        – JohnDoea
        yesterday














      up vote
      3
      down vote













      Have you already had a look at the ScriptHandler.php of drupal-composer/drupal-project?



      It provides certain functions that are run via composer.json as post-install-cmd and post-update-cmd. You could extend the ScriptHandler.php to provide a post-create-project-cmd which runs your Drush stuff. Maybe with the help of Symfony's Console Component.






      share|improve this answer




















      • Sadly I should first take some PHP and Drupal-programming courses before I could comfortably understand what's going there. I know no programming besides some fundamental vanilla Bash and JS.
        – JohnDoea
        yesterday












      up vote
      3
      down vote










      up vote
      3
      down vote









      Have you already had a look at the ScriptHandler.php of drupal-composer/drupal-project?



      It provides certain functions that are run via composer.json as post-install-cmd and post-update-cmd. You could extend the ScriptHandler.php to provide a post-create-project-cmd which runs your Drush stuff. Maybe with the help of Symfony's Console Component.






      share|improve this answer












      Have you already had a look at the ScriptHandler.php of drupal-composer/drupal-project?



      It provides certain functions that are run via composer.json as post-install-cmd and post-update-cmd. You could extend the ScriptHandler.php to provide a post-create-project-cmd which runs your Drush stuff. Maybe with the help of Symfony's Console Component.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered yesterday









      leymannx

      1313




      1313











      • Sadly I should first take some PHP and Drupal-programming courses before I could comfortably understand what's going there. I know no programming besides some fundamental vanilla Bash and JS.
        – JohnDoea
        yesterday
















      • Sadly I should first take some PHP and Drupal-programming courses before I could comfortably understand what's going there. I know no programming besides some fundamental vanilla Bash and JS.
        – JohnDoea
        yesterday















      Sadly I should first take some PHP and Drupal-programming courses before I could comfortably understand what's going there. I know no programming besides some fundamental vanilla Bash and JS.
      – JohnDoea
      yesterday




      Sadly I should first take some PHP and Drupal-programming courses before I could comfortably understand what's going there. I know no programming besides some fundamental vanilla Bash and JS.
      – JohnDoea
      yesterday












      up vote
      2
      down vote













      I know it's not a perfect fit to your question, but one option is to start with geerlingguys Drupal Vagrant Box:



      https://github.com/geerlingguy/drupal-vm



      With this, you can set a custom config.yml to override the default.config.yml which will allow you to set variables/info such as DB name, DB pass, MySQL user, Site name, etc... It gets you pretty close to an all in one "up" kind of thing.



      You can tell vagrant to install a DB or not. Install Drupal or not. You can have it use an existing DB on "up" command too.



      Some example config.yml overrides (not tested):



      ---

      vagrant_hostname: site_name.local
      vagrant_machine_name: site_name_vm
      drupal_site_name: "site_name"
      drupal_account_pass: pass
      drupal_db_name: site_name
      php_version: "7.1"

      vagrant_ip: 192.168.25.25
      vagrant_memory: 4096

      extra_packages:
      - sqlite
      - php-bcmath # This is needed for Commerce.

      php_memory_limit: "256M"
      php_display_errors: "On"
      mysql_root_password: pass
      drupal_account_name: admin
      drupal_db_user: root
      drupal_db_password: pass


      Then it's just a matter of running vagrant up in your command line and it's possible to have vagrant install Drupal with DB and all creds/info.




      You can take a look at the default.config.yml to see what's available and what you may want to override/set.






      share|improve this answer
























        up vote
        2
        down vote













        I know it's not a perfect fit to your question, but one option is to start with geerlingguys Drupal Vagrant Box:



        https://github.com/geerlingguy/drupal-vm



        With this, you can set a custom config.yml to override the default.config.yml which will allow you to set variables/info such as DB name, DB pass, MySQL user, Site name, etc... It gets you pretty close to an all in one "up" kind of thing.



        You can tell vagrant to install a DB or not. Install Drupal or not. You can have it use an existing DB on "up" command too.



        Some example config.yml overrides (not tested):



        ---

        vagrant_hostname: site_name.local
        vagrant_machine_name: site_name_vm
        drupal_site_name: "site_name"
        drupal_account_pass: pass
        drupal_db_name: site_name
        php_version: "7.1"

        vagrant_ip: 192.168.25.25
        vagrant_memory: 4096

        extra_packages:
        - sqlite
        - php-bcmath # This is needed for Commerce.

        php_memory_limit: "256M"
        php_display_errors: "On"
        mysql_root_password: pass
        drupal_account_name: admin
        drupal_db_user: root
        drupal_db_password: pass


        Then it's just a matter of running vagrant up in your command line and it's possible to have vagrant install Drupal with DB and all creds/info.




        You can take a look at the default.config.yml to see what's available and what you may want to override/set.






        share|improve this answer






















          up vote
          2
          down vote










          up vote
          2
          down vote









          I know it's not a perfect fit to your question, but one option is to start with geerlingguys Drupal Vagrant Box:



          https://github.com/geerlingguy/drupal-vm



          With this, you can set a custom config.yml to override the default.config.yml which will allow you to set variables/info such as DB name, DB pass, MySQL user, Site name, etc... It gets you pretty close to an all in one "up" kind of thing.



          You can tell vagrant to install a DB or not. Install Drupal or not. You can have it use an existing DB on "up" command too.



          Some example config.yml overrides (not tested):



          ---

          vagrant_hostname: site_name.local
          vagrant_machine_name: site_name_vm
          drupal_site_name: "site_name"
          drupal_account_pass: pass
          drupal_db_name: site_name
          php_version: "7.1"

          vagrant_ip: 192.168.25.25
          vagrant_memory: 4096

          extra_packages:
          - sqlite
          - php-bcmath # This is needed for Commerce.

          php_memory_limit: "256M"
          php_display_errors: "On"
          mysql_root_password: pass
          drupal_account_name: admin
          drupal_db_user: root
          drupal_db_password: pass


          Then it's just a matter of running vagrant up in your command line and it's possible to have vagrant install Drupal with DB and all creds/info.




          You can take a look at the default.config.yml to see what's available and what you may want to override/set.






          share|improve this answer












          I know it's not a perfect fit to your question, but one option is to start with geerlingguys Drupal Vagrant Box:



          https://github.com/geerlingguy/drupal-vm



          With this, you can set a custom config.yml to override the default.config.yml which will allow you to set variables/info such as DB name, DB pass, MySQL user, Site name, etc... It gets you pretty close to an all in one "up" kind of thing.



          You can tell vagrant to install a DB or not. Install Drupal or not. You can have it use an existing DB on "up" command too.



          Some example config.yml overrides (not tested):



          ---

          vagrant_hostname: site_name.local
          vagrant_machine_name: site_name_vm
          drupal_site_name: "site_name"
          drupal_account_pass: pass
          drupal_db_name: site_name
          php_version: "7.1"

          vagrant_ip: 192.168.25.25
          vagrant_memory: 4096

          extra_packages:
          - sqlite
          - php-bcmath # This is needed for Commerce.

          php_memory_limit: "256M"
          php_display_errors: "On"
          mysql_root_password: pass
          drupal_account_name: admin
          drupal_db_user: root
          drupal_db_password: pass


          Then it's just a matter of running vagrant up in your command line and it's possible to have vagrant install Drupal with DB and all creds/info.




          You can take a look at the default.config.yml to see what's available and what you may want to override/set.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 23 hours ago







          Prestosaurus



























              up vote
              2
              down vote













              Consider using dbjpanda's drupal-on-docker; simple installation with everything automated. You just have to install docker and then:



              1. Clone the repository.

              2. Update the .env file with all of your information like domain name, db password, etc.

              and you're good to go.






              share|improve this answer
























                up vote
                2
                down vote













                Consider using dbjpanda's drupal-on-docker; simple installation with everything automated. You just have to install docker and then:



                1. Clone the repository.

                2. Update the .env file with all of your information like domain name, db password, etc.

                and you're good to go.






                share|improve this answer






















                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  Consider using dbjpanda's drupal-on-docker; simple installation with everything automated. You just have to install docker and then:



                  1. Clone the repository.

                  2. Update the .env file with all of your information like domain name, db password, etc.

                  and you're good to go.






                  share|improve this answer












                  Consider using dbjpanda's drupal-on-docker; simple installation with everything automated. You just have to install docker and then:



                  1. Clone the repository.

                  2. Update the .env file with all of your information like domain name, db password, etc.

                  and you're good to go.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 21 hours ago









                  SkyRar

                  266




                  266



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f480616%2fcreating-a-new-latest-drupal-project-with-local-drush-with-all-desired-credenti%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Popular posts from this blog

                      Peggy Mitchell

                      The Forum (Inglewood, California)

                      Palaiologos