Creating a new Composerized latest-Drupal project with local-Drush and 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
-1
down vote

favorite












I use latest LAMP (Ubuntu 18.04 with Bash) with Composer and I desire to automate the entire process of creating a Composerized Drupal 8 with local Drush 9 or above project, at least after creating a db user and a db with the same name to it:



  1. Download Drupal to a directory for the project as /var/www/html/domain.tld.

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

  3. Create a proper settings.php with the relevant db details; db name, db user name, db password and locality - localhost).

  4. Restart the server.

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



composer create-project drupal-composer/drupal-project


How will you do that in a communally-supported way?










share|improve this question

















This question has an open bounty worth +100
reputation from JohnDoea ending ending at 2018-11-16 20:15:27Z">in 5 days.


This question has not received enough attention.







migrated from drupal.stackexchange.com Nov 8 at 18:26


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


















    up vote
    -1
    down vote

    favorite












    I use latest LAMP (Ubuntu 18.04 with Bash) with Composer and I desire to automate the entire process of creating a Composerized Drupal 8 with local Drush 9 or above project, at least after creating a db user and a db with the same name to it:



    1. Download Drupal to a directory for the project as /var/www/html/domain.tld.

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

    3. Create a proper settings.php with the relevant db details; db name, db user name, db password and locality - localhost).

    4. Restart the server.

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



    composer create-project drupal-composer/drupal-project


    How will you do that in a communally-supported way?










    share|improve this question

















    This question has an open bounty worth +100
    reputation from JohnDoea ending ending at 2018-11-16 20:15:27Z">in 5 days.


    This question has not received enough attention.







    migrated from drupal.stackexchange.com Nov 8 at 18:26


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
















      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I use latest LAMP (Ubuntu 18.04 with Bash) with Composer and I desire to automate the entire process of creating a Composerized Drupal 8 with local Drush 9 or above project, at least after creating a db user and a db with the same name to it:



      1. Download Drupal to a directory for the project as /var/www/html/domain.tld.

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

      3. Create a proper settings.php with the relevant db details; db name, db user name, db password and locality - localhost).

      4. Restart the server.

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



      composer create-project drupal-composer/drupal-project


      How will you do that in a communally-supported way?










      share|improve this question















      I use latest LAMP (Ubuntu 18.04 with Bash) with Composer and I desire to automate the entire process of creating a Composerized Drupal 8 with local Drush 9 or above project, at least after creating a db user and a db with the same name to it:



      1. Download Drupal to a directory for the project as /var/www/html/domain.tld.

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

      3. Create a proper settings.php with the relevant db details; db name, db user name, db password and locality - localhost).

      4. Restart the server.

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



      composer create-project drupal-composer/drupal-project


      How will you do that in a communally-supported way?







      drupal






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 1 hour ago

























      asked Nov 7 at 16:06









      JohnDoea

      55831




      55831






      This question has an open bounty worth +100
      reputation from JohnDoea ending ending at 2018-11-16 20:15:27Z">in 5 days.


      This question has not received enough attention.








      This question has an open bounty worth +100
      reputation from JohnDoea ending ending at 2018-11-16 20:15:27Z">in 5 days.


      This question has not received enough attention.






      migrated from drupal.stackexchange.com Nov 8 at 18:26


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






      migrated from drupal.stackexchange.com Nov 8 at 18:26


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






















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          5
          down vote













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



          Step 1



          git clone https://github.com/dbjpanda/drupal-on-docker.git && cd drupal-on-docker



          Step 2



          Rename .env.example to .env and update the .env file with all of your information like domain name, db password, etc.



          Step 3



          docker-compose up -d



          Step 4



          docker exec -it PROJECT_NAME composer install



          Step 5



          Install drupal via drush or through the url 'DOMAIN_NAME' set in .env file or by the following command docker exec -it PROJECT_NAME drush si



          and you're good to go.






          share|improve this answer






















          • I know offer 100 bounty for an answer. I recommend adding some more detail or some stepped usage example.
            – JohnDoea
            2 days ago











          • @JohnDoea Please go through the README file on that repo. It is easily understandable. And if you don't understand then please comment. I would be happy to help you.
            – SkyRar
            2 days ago










          • I read there, "I lost contact" on Devops workflow ( If you want to deploy to a live server using CI/CD). What does that mean?... Especially, how it differs from the previous 5-steps?
            – JohnDoea
            7 hours ago










          • Ahh. Let me know what exactly you are doing ? Are you deploying Drupal locally or on a server ? Also if you you not aware of CI/CD you can skip that. Just follow the above 5 steps.
            – SkyRar
            7 hours ago










          • You just asked one question how to set up the project in one go ? But that is not the end. You may be developing your project continuously and uploading it via ftp then ssh to server and again execute dush cim,drush cr etc... But that will be again a manual process. So CI/CD helps in that case. But if your site is small then it may not be required.
            – SkyRar
            7 hours ago


















          up vote
          4
          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
            Nov 7 at 18:34

















          up vote
          4
          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 (what it might look like):



          ---

          ## Install php-bcmath if needed - "apt-get install php7.0-bcmath" #

          # Change these per site instance
          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. If no Commerce you may delete.

          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.




          • Nothing is quite an "all in one" solution but here are some steps to try, haven't tested in a bit so will review:

          1) Get your Vagrant Box:



          git clone git@github.com:geerlingguy/drupal-vm.git site_name

          cd site_name/


          2) Copy this config.yml to your Vagrant Box root and edit to match your site details:



          sudo curl -o config.yml https://gist.githubusercontent.com/prestonschmidt/7594a93f71fb0b45f26dfa42baaf0447/raw/1105ada763d130ffa16dd1949b44c9fd2d07cc79/config.yml


          2a) > Remember to edit that config.yml to match your site details, THEN:



          vagrant up


          Yep, that takes a bit, go dream of the future and come back in about 10 minutes... really



          3) Copy this settings.local.php file to your drupal/web/sites/default/ directory:



          sudo curl -o drupal/web/sites/default/settings.local.php https://gist.githubusercontent.com/prestonschmidt/54862c853ba0d35eb9591abfe783176d/raw/80789f6add2c205b7ad7caf2814b72284ff82f0c/settings.local.php


          > Edit the settings.php file to include the settings.local.php by uncommenting that section at the bottom of the file



          4) Copy this development.services.yml file to your drupal/web/sites/ directory:



          sudo curl -o drupal/web/sites/development.yml https://gist.githubusercontent.com/prestonschmidt/a9a6b81dc69cb1a26775f927f768274e/raw/fb2e3fec99d47ca7ef4765f04c4eba01dd907539/development.services.yml


          I can replace the links with code, just trying not to have a mile long post. If this approach feels like it might work for you, I am happy to work on it more.



          With this answer, it's all about making a perfect config.yml file, then running vagrant up.



          What makes Vagrant a great contender is that it installs Drush, Composer, and is well maintained.






          share|improve this answer






















          • Although I can understand some YAML from Drupal 8 and otherwise, I never actually used Ansible (the famous CM tool), Vargant, or Docker (the famous containerization tool). I understand we deploy up-2-date software and conf with Ansible (locally or remotely) and I understand we "copy away" containers of "its-frozen-just-bake" data with Docker, but I don't know how Vargant is different than these two and if there is any difference between Vargant itself to a Vargant box. The term "Vargant box" makes me to wonder if Vargant is an actual "competitor" for Docker... Is it?... At least in this case?
            – JohnDoea
            4 hours ago










          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-composerized-latest-drupal-project-with-local-drush-and-all-desir%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
          5
          down vote













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



          Step 1



          git clone https://github.com/dbjpanda/drupal-on-docker.git && cd drupal-on-docker



          Step 2



          Rename .env.example to .env and update the .env file with all of your information like domain name, db password, etc.



          Step 3



          docker-compose up -d



          Step 4



          docker exec -it PROJECT_NAME composer install



          Step 5



          Install drupal via drush or through the url 'DOMAIN_NAME' set in .env file or by the following command docker exec -it PROJECT_NAME drush si



          and you're good to go.






          share|improve this answer






















          • I know offer 100 bounty for an answer. I recommend adding some more detail or some stepped usage example.
            – JohnDoea
            2 days ago











          • @JohnDoea Please go through the README file on that repo. It is easily understandable. And if you don't understand then please comment. I would be happy to help you.
            – SkyRar
            2 days ago










          • I read there, "I lost contact" on Devops workflow ( If you want to deploy to a live server using CI/CD). What does that mean?... Especially, how it differs from the previous 5-steps?
            – JohnDoea
            7 hours ago










          • Ahh. Let me know what exactly you are doing ? Are you deploying Drupal locally or on a server ? Also if you you not aware of CI/CD you can skip that. Just follow the above 5 steps.
            – SkyRar
            7 hours ago










          • You just asked one question how to set up the project in one go ? But that is not the end. You may be developing your project continuously and uploading it via ftp then ssh to server and again execute dush cim,drush cr etc... But that will be again a manual process. So CI/CD helps in that case. But if your site is small then it may not be required.
            – SkyRar
            7 hours ago















          up vote
          5
          down vote













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



          Step 1



          git clone https://github.com/dbjpanda/drupal-on-docker.git && cd drupal-on-docker



          Step 2



          Rename .env.example to .env and update the .env file with all of your information like domain name, db password, etc.



          Step 3



          docker-compose up -d



          Step 4



          docker exec -it PROJECT_NAME composer install



          Step 5



          Install drupal via drush or through the url 'DOMAIN_NAME' set in .env file or by the following command docker exec -it PROJECT_NAME drush si



          and you're good to go.






          share|improve this answer






















          • I know offer 100 bounty for an answer. I recommend adding some more detail or some stepped usage example.
            – JohnDoea
            2 days ago











          • @JohnDoea Please go through the README file on that repo. It is easily understandable. And if you don't understand then please comment. I would be happy to help you.
            – SkyRar
            2 days ago










          • I read there, "I lost contact" on Devops workflow ( If you want to deploy to a live server using CI/CD). What does that mean?... Especially, how it differs from the previous 5-steps?
            – JohnDoea
            7 hours ago










          • Ahh. Let me know what exactly you are doing ? Are you deploying Drupal locally or on a server ? Also if you you not aware of CI/CD you can skip that. Just follow the above 5 steps.
            – SkyRar
            7 hours ago










          • You just asked one question how to set up the project in one go ? But that is not the end. You may be developing your project continuously and uploading it via ftp then ssh to server and again execute dush cim,drush cr etc... But that will be again a manual process. So CI/CD helps in that case. But if your site is small then it may not be required.
            – SkyRar
            7 hours ago













          up vote
          5
          down vote










          up vote
          5
          down vote









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



          Step 1



          git clone https://github.com/dbjpanda/drupal-on-docker.git && cd drupal-on-docker



          Step 2



          Rename .env.example to .env and update the .env file with all of your information like domain name, db password, etc.



          Step 3



          docker-compose up -d



          Step 4



          docker exec -it PROJECT_NAME composer install



          Step 5



          Install drupal via drush or through the url 'DOMAIN_NAME' set in .env file or by the following command docker exec -it PROJECT_NAME drush si



          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:



          Step 1



          git clone https://github.com/dbjpanda/drupal-on-docker.git && cd drupal-on-docker



          Step 2



          Rename .env.example to .env and update the .env file with all of your information like domain name, db password, etc.



          Step 3



          docker-compose up -d



          Step 4



          docker exec -it PROJECT_NAME composer install



          Step 5



          Install drupal via drush or through the url 'DOMAIN_NAME' set in .env file or by the following command docker exec -it PROJECT_NAME drush si



          and you're good to go.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 5 hours ago

























          answered Nov 7 at 21:20









          SkyRar

          547




          547











          • I know offer 100 bounty for an answer. I recommend adding some more detail or some stepped usage example.
            – JohnDoea
            2 days ago











          • @JohnDoea Please go through the README file on that repo. It is easily understandable. And if you don't understand then please comment. I would be happy to help you.
            – SkyRar
            2 days ago










          • I read there, "I lost contact" on Devops workflow ( If you want to deploy to a live server using CI/CD). What does that mean?... Especially, how it differs from the previous 5-steps?
            – JohnDoea
            7 hours ago










          • Ahh. Let me know what exactly you are doing ? Are you deploying Drupal locally or on a server ? Also if you you not aware of CI/CD you can skip that. Just follow the above 5 steps.
            – SkyRar
            7 hours ago










          • You just asked one question how to set up the project in one go ? But that is not the end. You may be developing your project continuously and uploading it via ftp then ssh to server and again execute dush cim,drush cr etc... But that will be again a manual process. So CI/CD helps in that case. But if your site is small then it may not be required.
            – SkyRar
            7 hours ago

















          • I know offer 100 bounty for an answer. I recommend adding some more detail or some stepped usage example.
            – JohnDoea
            2 days ago











          • @JohnDoea Please go through the README file on that repo. It is easily understandable. And if you don't understand then please comment. I would be happy to help you.
            – SkyRar
            2 days ago










          • I read there, "I lost contact" on Devops workflow ( If you want to deploy to a live server using CI/CD). What does that mean?... Especially, how it differs from the previous 5-steps?
            – JohnDoea
            7 hours ago










          • Ahh. Let me know what exactly you are doing ? Are you deploying Drupal locally or on a server ? Also if you you not aware of CI/CD you can skip that. Just follow the above 5 steps.
            – SkyRar
            7 hours ago










          • You just asked one question how to set up the project in one go ? But that is not the end. You may be developing your project continuously and uploading it via ftp then ssh to server and again execute dush cim,drush cr etc... But that will be again a manual process. So CI/CD helps in that case. But if your site is small then it may not be required.
            – SkyRar
            7 hours ago
















          I know offer 100 bounty for an answer. I recommend adding some more detail or some stepped usage example.
          – JohnDoea
          2 days ago





          I know offer 100 bounty for an answer. I recommend adding some more detail or some stepped usage example.
          – JohnDoea
          2 days ago













          @JohnDoea Please go through the README file on that repo. It is easily understandable. And if you don't understand then please comment. I would be happy to help you.
          – SkyRar
          2 days ago




          @JohnDoea Please go through the README file on that repo. It is easily understandable. And if you don't understand then please comment. I would be happy to help you.
          – SkyRar
          2 days ago












          I read there, "I lost contact" on Devops workflow ( If you want to deploy to a live server using CI/CD). What does that mean?... Especially, how it differs from the previous 5-steps?
          – JohnDoea
          7 hours ago




          I read there, "I lost contact" on Devops workflow ( If you want to deploy to a live server using CI/CD). What does that mean?... Especially, how it differs from the previous 5-steps?
          – JohnDoea
          7 hours ago












          Ahh. Let me know what exactly you are doing ? Are you deploying Drupal locally or on a server ? Also if you you not aware of CI/CD you can skip that. Just follow the above 5 steps.
          – SkyRar
          7 hours ago




          Ahh. Let me know what exactly you are doing ? Are you deploying Drupal locally or on a server ? Also if you you not aware of CI/CD you can skip that. Just follow the above 5 steps.
          – SkyRar
          7 hours ago












          You just asked one question how to set up the project in one go ? But that is not the end. You may be developing your project continuously and uploading it via ftp then ssh to server and again execute dush cim,drush cr etc... But that will be again a manual process. So CI/CD helps in that case. But if your site is small then it may not be required.
          – SkyRar
          7 hours ago





          You just asked one question how to set up the project in one go ? But that is not the end. You may be developing your project continuously and uploading it via ftp then ssh to server and again execute dush cim,drush cr etc... But that will be again a manual process. So CI/CD helps in that case. But if your site is small then it may not be required.
          – SkyRar
          7 hours ago













          up vote
          4
          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
            Nov 7 at 18:34














          up vote
          4
          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
            Nov 7 at 18:34












          up vote
          4
          down vote










          up vote
          4
          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 Nov 7 at 17:49









          leymannx

          1434




          1434











          • 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
            Nov 7 at 18:34
















          • 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
            Nov 7 at 18:34















          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
          Nov 7 at 18:34




          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
          Nov 7 at 18:34










          up vote
          4
          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 (what it might look like):



          ---

          ## Install php-bcmath if needed - "apt-get install php7.0-bcmath" #

          # Change these per site instance
          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. If no Commerce you may delete.

          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.




          • Nothing is quite an "all in one" solution but here are some steps to try, haven't tested in a bit so will review:

          1) Get your Vagrant Box:



          git clone git@github.com:geerlingguy/drupal-vm.git site_name

          cd site_name/


          2) Copy this config.yml to your Vagrant Box root and edit to match your site details:



          sudo curl -o config.yml https://gist.githubusercontent.com/prestonschmidt/7594a93f71fb0b45f26dfa42baaf0447/raw/1105ada763d130ffa16dd1949b44c9fd2d07cc79/config.yml


          2a) > Remember to edit that config.yml to match your site details, THEN:



          vagrant up


          Yep, that takes a bit, go dream of the future and come back in about 10 minutes... really



          3) Copy this settings.local.php file to your drupal/web/sites/default/ directory:



          sudo curl -o drupal/web/sites/default/settings.local.php https://gist.githubusercontent.com/prestonschmidt/54862c853ba0d35eb9591abfe783176d/raw/80789f6add2c205b7ad7caf2814b72284ff82f0c/settings.local.php


          > Edit the settings.php file to include the settings.local.php by uncommenting that section at the bottom of the file



          4) Copy this development.services.yml file to your drupal/web/sites/ directory:



          sudo curl -o drupal/web/sites/development.yml https://gist.githubusercontent.com/prestonschmidt/a9a6b81dc69cb1a26775f927f768274e/raw/fb2e3fec99d47ca7ef4765f04c4eba01dd907539/development.services.yml


          I can replace the links with code, just trying not to have a mile long post. If this approach feels like it might work for you, I am happy to work on it more.



          With this answer, it's all about making a perfect config.yml file, then running vagrant up.



          What makes Vagrant a great contender is that it installs Drush, Composer, and is well maintained.






          share|improve this answer






















          • Although I can understand some YAML from Drupal 8 and otherwise, I never actually used Ansible (the famous CM tool), Vargant, or Docker (the famous containerization tool). I understand we deploy up-2-date software and conf with Ansible (locally or remotely) and I understand we "copy away" containers of "its-frozen-just-bake" data with Docker, but I don't know how Vargant is different than these two and if there is any difference between Vargant itself to a Vargant box. The term "Vargant box" makes me to wonder if Vargant is an actual "competitor" for Docker... Is it?... At least in this case?
            – JohnDoea
            4 hours ago














          up vote
          4
          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 (what it might look like):



          ---

          ## Install php-bcmath if needed - "apt-get install php7.0-bcmath" #

          # Change these per site instance
          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. If no Commerce you may delete.

          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.




          • Nothing is quite an "all in one" solution but here are some steps to try, haven't tested in a bit so will review:

          1) Get your Vagrant Box:



          git clone git@github.com:geerlingguy/drupal-vm.git site_name

          cd site_name/


          2) Copy this config.yml to your Vagrant Box root and edit to match your site details:



          sudo curl -o config.yml https://gist.githubusercontent.com/prestonschmidt/7594a93f71fb0b45f26dfa42baaf0447/raw/1105ada763d130ffa16dd1949b44c9fd2d07cc79/config.yml


          2a) > Remember to edit that config.yml to match your site details, THEN:



          vagrant up


          Yep, that takes a bit, go dream of the future and come back in about 10 minutes... really



          3) Copy this settings.local.php file to your drupal/web/sites/default/ directory:



          sudo curl -o drupal/web/sites/default/settings.local.php https://gist.githubusercontent.com/prestonschmidt/54862c853ba0d35eb9591abfe783176d/raw/80789f6add2c205b7ad7caf2814b72284ff82f0c/settings.local.php


          > Edit the settings.php file to include the settings.local.php by uncommenting that section at the bottom of the file



          4) Copy this development.services.yml file to your drupal/web/sites/ directory:



          sudo curl -o drupal/web/sites/development.yml https://gist.githubusercontent.com/prestonschmidt/a9a6b81dc69cb1a26775f927f768274e/raw/fb2e3fec99d47ca7ef4765f04c4eba01dd907539/development.services.yml


          I can replace the links with code, just trying not to have a mile long post. If this approach feels like it might work for you, I am happy to work on it more.



          With this answer, it's all about making a perfect config.yml file, then running vagrant up.



          What makes Vagrant a great contender is that it installs Drush, Composer, and is well maintained.






          share|improve this answer






















          • Although I can understand some YAML from Drupal 8 and otherwise, I never actually used Ansible (the famous CM tool), Vargant, or Docker (the famous containerization tool). I understand we deploy up-2-date software and conf with Ansible (locally or remotely) and I understand we "copy away" containers of "its-frozen-just-bake" data with Docker, but I don't know how Vargant is different than these two and if there is any difference between Vargant itself to a Vargant box. The term "Vargant box" makes me to wonder if Vargant is an actual "competitor" for Docker... Is it?... At least in this case?
            – JohnDoea
            4 hours ago












          up vote
          4
          down vote










          up vote
          4
          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 (what it might look like):



          ---

          ## Install php-bcmath if needed - "apt-get install php7.0-bcmath" #

          # Change these per site instance
          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. If no Commerce you may delete.

          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.




          • Nothing is quite an "all in one" solution but here are some steps to try, haven't tested in a bit so will review:

          1) Get your Vagrant Box:



          git clone git@github.com:geerlingguy/drupal-vm.git site_name

          cd site_name/


          2) Copy this config.yml to your Vagrant Box root and edit to match your site details:



          sudo curl -o config.yml https://gist.githubusercontent.com/prestonschmidt/7594a93f71fb0b45f26dfa42baaf0447/raw/1105ada763d130ffa16dd1949b44c9fd2d07cc79/config.yml


          2a) > Remember to edit that config.yml to match your site details, THEN:



          vagrant up


          Yep, that takes a bit, go dream of the future and come back in about 10 minutes... really



          3) Copy this settings.local.php file to your drupal/web/sites/default/ directory:



          sudo curl -o drupal/web/sites/default/settings.local.php https://gist.githubusercontent.com/prestonschmidt/54862c853ba0d35eb9591abfe783176d/raw/80789f6add2c205b7ad7caf2814b72284ff82f0c/settings.local.php


          > Edit the settings.php file to include the settings.local.php by uncommenting that section at the bottom of the file



          4) Copy this development.services.yml file to your drupal/web/sites/ directory:



          sudo curl -o drupal/web/sites/development.yml https://gist.githubusercontent.com/prestonschmidt/a9a6b81dc69cb1a26775f927f768274e/raw/fb2e3fec99d47ca7ef4765f04c4eba01dd907539/development.services.yml


          I can replace the links with code, just trying not to have a mile long post. If this approach feels like it might work for you, I am happy to work on it more.



          With this answer, it's all about making a perfect config.yml file, then running vagrant up.



          What makes Vagrant a great contender is that it installs Drush, Composer, and is well maintained.






          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 (what it might look like):



          ---

          ## Install php-bcmath if needed - "apt-get install php7.0-bcmath" #

          # Change these per site instance
          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. If no Commerce you may delete.

          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.




          • Nothing is quite an "all in one" solution but here are some steps to try, haven't tested in a bit so will review:

          1) Get your Vagrant Box:



          git clone git@github.com:geerlingguy/drupal-vm.git site_name

          cd site_name/


          2) Copy this config.yml to your Vagrant Box root and edit to match your site details:



          sudo curl -o config.yml https://gist.githubusercontent.com/prestonschmidt/7594a93f71fb0b45f26dfa42baaf0447/raw/1105ada763d130ffa16dd1949b44c9fd2d07cc79/config.yml


          2a) > Remember to edit that config.yml to match your site details, THEN:



          vagrant up


          Yep, that takes a bit, go dream of the future and come back in about 10 minutes... really



          3) Copy this settings.local.php file to your drupal/web/sites/default/ directory:



          sudo curl -o drupal/web/sites/default/settings.local.php https://gist.githubusercontent.com/prestonschmidt/54862c853ba0d35eb9591abfe783176d/raw/80789f6add2c205b7ad7caf2814b72284ff82f0c/settings.local.php


          > Edit the settings.php file to include the settings.local.php by uncommenting that section at the bottom of the file



          4) Copy this development.services.yml file to your drupal/web/sites/ directory:



          sudo curl -o drupal/web/sites/development.yml https://gist.githubusercontent.com/prestonschmidt/a9a6b81dc69cb1a26775f927f768274e/raw/fb2e3fec99d47ca7ef4765f04c4eba01dd907539/development.services.yml


          I can replace the links with code, just trying not to have a mile long post. If this approach feels like it might work for you, I am happy to work on it more.



          With this answer, it's all about making a perfect config.yml file, then running vagrant up.



          What makes Vagrant a great contender is that it installs Drush, Composer, and is well maintained.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered Nov 7 at 18:41









          Prestosaurus

          1413




          1413











          • Although I can understand some YAML from Drupal 8 and otherwise, I never actually used Ansible (the famous CM tool), Vargant, or Docker (the famous containerization tool). I understand we deploy up-2-date software and conf with Ansible (locally or remotely) and I understand we "copy away" containers of "its-frozen-just-bake" data with Docker, but I don't know how Vargant is different than these two and if there is any difference between Vargant itself to a Vargant box. The term "Vargant box" makes me to wonder if Vargant is an actual "competitor" for Docker... Is it?... At least in this case?
            – JohnDoea
            4 hours ago
















          • Although I can understand some YAML from Drupal 8 and otherwise, I never actually used Ansible (the famous CM tool), Vargant, or Docker (the famous containerization tool). I understand we deploy up-2-date software and conf with Ansible (locally or remotely) and I understand we "copy away" containers of "its-frozen-just-bake" data with Docker, but I don't know how Vargant is different than these two and if there is any difference between Vargant itself to a Vargant box. The term "Vargant box" makes me to wonder if Vargant is an actual "competitor" for Docker... Is it?... At least in this case?
            – JohnDoea
            4 hours ago















          Although I can understand some YAML from Drupal 8 and otherwise, I never actually used Ansible (the famous CM tool), Vargant, or Docker (the famous containerization tool). I understand we deploy up-2-date software and conf with Ansible (locally or remotely) and I understand we "copy away" containers of "its-frozen-just-bake" data with Docker, but I don't know how Vargant is different than these two and if there is any difference between Vargant itself to a Vargant box. The term "Vargant box" makes me to wonder if Vargant is an actual "competitor" for Docker... Is it?... At least in this case?
          – JohnDoea
          4 hours ago




          Although I can understand some YAML from Drupal 8 and otherwise, I never actually used Ansible (the famous CM tool), Vargant, or Docker (the famous containerization tool). I understand we deploy up-2-date software and conf with Ansible (locally or remotely) and I understand we "copy away" containers of "its-frozen-just-bake" data with Docker, but I don't know how Vargant is different than these two and if there is any difference between Vargant itself to a Vargant box. The term "Vargant box" makes me to wonder if Vargant is an actual "competitor" for Docker... Is it?... At least in this case?
          – JohnDoea
          4 hours ago

















           

          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-composerized-latest-drupal-project-with-local-drush-and-all-desir%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?