-
Notifications
You must be signed in to change notification settings - Fork 7
New Developers
This page will help you install and configure Vagrant on your local machine for local development.
To get up and running right away without having to install the many dependencies needed to get Local Ground to run, you have the option of creating a Virtual Machine with all of the dependencies defined and configured. Follow these steps:
-
Download VirtualBox for your operating system.
-
Download Vagrant for your operating system.
-
At the command line, clone the Git Repository on your local machine:
git clone https://github.com/LocalGround/localground.git -
Navigate to your Local Ground directory at the command line, and type
vagrant up -
Wait about 45 minutes for Vagrant to configure your new virtual machine instance (using this shell script).
-
Now, open your web browser to http://localhost:7777. Vagrant has been configured to forward all requests to the :7777 port to Apache on your Virtual Server that you just created. You should see a functioning instance of Local Ground operating in your web browser.
-
Register for a local account here: http://localhost:7777/accounts/register/.
- You should rarely have to ssh into your VM (other than to restart apache), and can edit files in your local machine using a text editor of your choice.
- If you edit python files on your local machine, make sure you restart apache in your VM to see the changes take effect in your web browser:
- vagrant ssh
- sudo service apache2 restart
- The password for the vagrant user on your VM is also "vagrant"
- If you ssh to your VM instance, all of the source code is located here:
/localground. - If you delete a file in the
/localgrounddirectory of your VM, it will also be deleted on your local machine (and vice versa), as the folder is shared. - Useful Vagrant commands:
- To ssh into your machine using Vagrant, just type "vagrant ssh" at the command line in your localground root folder.
- To pause your vagrant VM, type:
vagrant suspend - To restart your vagrant VM. type:
vagrant up - To reload dependencies / changes to either the Vagrantfile or to the /deploy_tools/bootstrap.sh file, type:
vagrant reload --provision