Installing Planigle - Planigle/planigle GitHub Wiki
Installation Prerequisites
Note: version numbers below represent what is currently running in production. Support is easiest to provide the closer you are to these versions.
Ruby 2.3 - http://www.ruby-lang.org/en/downloads/ or in ubuntu: sudo curl -sSL https://get.rvm.io | bash -s stable; rvm install 2.3
MySQL 5.1.41 (or higher) - http://dev.mysql.com/downloads/ or in ubuntu: sudo apt-get install mysql-server
Git - http://git-scm.com/downloads
Getting Started:
Clone the current Planigle version to your computer using Git:
git clone https://github.com/Planigle/planigle.git
Install the necessary gems:
bundle install
Create a database for Planigle:
mysql -u root -p password
create database planigle_production;
exit
cd directory
rake db:migrate RAILS_ENV=production
Configure Planigle:
In path /config/database.yml, set the properties for your local DB (if different from the default).
In path /config/initializers/mail.rb, configure your mail settings.
In path /config/environments/production.rb, configure your server settings.
Build UI:
ng build --prod
Using Apache (optional; but need to direct traffic to the appropriate ports based on URL)
In Ubuntu, run:
sudo apt-get install apache2
In Windows, to create an Apache server on your development box:
Install Apache (from http://httpd.apache.org/download.cgi)
Add the following to your .htaccess file:
RewriteEngine on
RewriteRule ^planigle/api/(.*) http://172.0.0.1:3000/$1 [P,QSA,L]
RewriteRule ^planigle/(.*) http://172.0.0.1:4200/$1 [P,QSA,L]
Run Planigle:
cd directory
export SECRET_KEY_BASE=<some random hex string>
ruby bin/rails server -e production
ng serve
Test by bringing Planigle up in the browser at http://[hostname]/
Create a job to summarize data:
Create a once a day cron job to go to http://[hostname]/api/summarize