Giter Site home page Giter Site logo

vagrant-magento2-apache-base's Introduction

vagrant-magento2-apache-base

Quick and dirty Vagrant image for building Magento 2. The idea is you run MySQL and Apache in a Vagrant 'box' (VM), but do all your development using your normal tools on your desktop.

It purposely only uses shell scripts to configure things so readers can poke around and not have to learn yet another technology like Chef, Puppet, or Ansible. Serious developers might like to look at other Vagrant images.

See http://vagrantup.com/ for Vagrant installation instructions.

Make sure to install the latest version of VirtualBox and VirtualBox Addons before proceeding.

If you want a stable Vagrant set up, clone or keep a copy - I am going to rework as I see fit for a while yet.

To use, check out Magento 2 and this Vagrant files in sibling directories. For example:

cd myprojects
git clone https://github.com/magento/magento2.git
git clone https://github.com/alankent/vagrant-magento2-apache-base.git

The Vagrantfile mounts ../magento2 under /var/www/magento2.

You can edit using your local tools in your laptop/desktop etc. Go into the 'magento2' directory and edit away!

To start up the Vagrant image, go into 'vagrant-magento2-apache-base' and run 'vagrant up'. It contains its own MySQL database and Apache web server. You need to log in and run the deploy script from inside for now. This runs the Magento setup script (wipes database, wipes caches, creates config files etc). This may change in the future

cd vagrant-magento2-apache-base
vagrant up

First time you check out the tree, you need to run composer to download 3rd party libraries. You can do this on your laptop/desktop or inside Vagrant. First time you do an install, later you would do a comoser update after each git pull to make sure the libraries are kept up to date. This is slow, so I did not include in the deploy.sh script.

vagrant ssh -- "cd /var/www/magento2 && composer install"

You also need to create the local database, or occasionally wipe it to start again. A deploy.sh shell script is provided to do this.

vagrant ssh -- sh /vagrant/scripts/deploy.sh

Finally, accesses your site on your laptop/desktop using http://localhost:8080/

Feedback welcome!

See also

(Future ideas include parameterizing so you can pick the web server (Apache or Nginx), pick the database server (MySQL, MariaDB, Percona etc), add Redis, Varnish etc auxiliary servers. One day!)

vagrant-magento2-apache-base's People

Contributors

alankent avatar talesh avatar maxbucknell avatar nevvermind avatar okolya avatar orthographic-pedant avatar

Watchers

Yk.L avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.