2014-03-10 00:25:00 +00:00
|
|
|
## Vagrant ##
|
2014-03-02 11:58:17 +00:00
|
|
|
|
|
|
|
|
Vagrant is a system to create reproducible and portable development
|
|
|
|
|
environments. Because of the variety of systems used for HabitRPG
|
|
|
|
|
development and the various issues developers may encounter setting up
|
2014-03-10 00:25:00 +00:00
|
|
|
HabitRPG on them, vagrant provides a single development enviroment with
|
|
|
|
|
minimal dependencies on the developer's local platform.
|
2014-03-02 11:58:17 +00:00
|
|
|
|
|
|
|
|
To use Vagrant, go to [their downloads
|
|
|
|
|
page](http://www.vagrantup.com/downloads.html) and download and install
|
|
|
|
|
the software appropriate for your system.
|
|
|
|
|
|
|
|
|
|
Once Vagrant has been installed, issue the following commands to get the
|
|
|
|
|
environment up and running:
|
|
|
|
|
|
2014-03-10 00:25:00 +00:00
|
|
|
1. Fork and Clone the HabitRPG git repository
|
2014-03-03 20:54:48 +00:00
|
|
|
2. Boot up the box:
|
2014-03-10 00:25:00 +00:00
|
|
|
|
|
|
|
|
`vagrant up`
|
|
|
|
|
|
2014-03-03 20:54:48 +00:00
|
|
|
3. Login to the environment:
|
2014-03-02 11:58:17 +00:00
|
|
|
|
2014-03-10 00:25:00 +00:00
|
|
|
`vagrant ssh`
|
|
|
|
|
|
|
|
|
|
4. Once you're on the vagrant machine, change to your working directory:
|
|
|
|
|
|
|
|
|
|
`cd /vagrant`
|
|
|
|
|
|
|
|
|
|
You should see all the files from the git repository here.
|
|
|
|
|
|
|
|
|
|
5. Start the system:
|
|
|
|
|
|
|
|
|
|
`npm start`
|
|
|
|
|
|
|
|
|
|
## Automatic Startup ##
|
|
|
|
|
|
|
|
|
|
You can opt to have the initial `vagrant up` command start the entire
|
|
|
|
|
system. If you choose to do so, edit the file Vagrantfile in your
|
|
|
|
|
HabitRPG directory, and remove the '#' in front of the
|
|
|
|
|
|
|
|
|
|
> `#config.vm.provision :shell, :path => "vagrant.sh"`
|
|
|
|
|
|
|
|
|
|
Once the system is up and running, you will need to open another shell to run
|
|
|
|
|
`vagrant ssh`
|