"Geospatial web fancy buy stuff thing. "
Please make sure you have following software installed before proceed.
- VirtualBox 4.2.x
- ruby (preferbly via rvm)
- vagrant
gem install vagrant
- Check out the project via git
git clone git://github.com/HKCodeCamp/bartr.git
- In the root folder of the project, run following commands to install dependencies:
gem install vagrant
- Start Vagrant
vagrant up
- SSH into VM
vagrant ssh
- In the VM, change to app folder:
cd /vagrant
- Install project dependencies
bundle install
- Create Database
sudo su postgres
createdb bartr_test
createdb bartr_development
(Ctrl-d)
-
Setup App Setting
-
Copy config/application.default.yml to config/application.yml and fill in proper keys
-
(For Production ENV) heroku config: https://devcenter.heroku.com/articles/config-vars
-
heroku config:add HEROKU_API_KEY=xxxxx APP_NAME=yyyy ( for delayed_job worker )
-
-
Startup the server:
bundle exec foreman start
Verified if everything setup properly by open browser (on your host machine) and enter http://10.10.10.10:5000.
It should show the app website.
If everything worked properly, you can press Ctrl-C to exit foreman.
You may suspend the VM from your host machine via command:
vagrant suspend
For more details:
- Vagrant Get Started Guide
- Bundler - Application dependencies management
- Foreman - Process management