No Description

gwillz 08219bec03 also removed builtin unloader on page change 5 years ago
app 08219bec03 also removed builtin unloader on page change 5 years ago
bin 797dc310a1 initial db and code stuffs 6 years ago
config d99de190dc added alumni approval, closes #227 5 years ago
db ac55f5fed2 added new seeds, fields now display in filter index 5 years ago
lib 960e863829 admin shortcut tweaks, don't email coordinators about 0 students 5 years ago
log 797dc310a1 initial db and code stuffs 6 years ago
public 4d7e6af251 removed marceline link from error pages, closes #251 5 years ago
test ac9fc10043 added mailers for user and form, issue #28 6 years ago
vendor 797dc310a1 initial db and code stuffs 6 years ago
.gitignore c7c899be0e minor spelling errors 5 years ago
Gemfile bd836b72c4 added some cheeky graphs 5 years ago
Gemfile.lock bd836b72c4 added some cheeky graphs 5 years ago
README.rdoc b43ffb104e readme tweaks 5 years ago
Rakefile 797dc310a1 initial db and code stuffs 6 years ago
aps_logo4.psd 29df0a342a changed all 'lincoln' references to config file, updated logo 5 years ago
config.ru 797dc310a1 initial db and code stuffs 6 years ago
empty.psd c7198fd36b update favicon, empty.png and stuff 6 years ago
nginx.service 4901d89810 settings, files, etc adjusted for deployment 5 years ago

README.rdoc

== README
These are all written with a 'systemd' linux distro in mind.

If you plan to deploy on a 'sysVinit' linux, adjust instructions appropriately

==== Tested with
* Archlinux x86_64 and armv6h
* Ruby 2.2.0 / Rails 4.0.4 / Passenger 4.0.57

==== System dependencies
* ruby v2+
* imagemagick
* postgres, v9+
* ruby-bundler (sudo gem install bundler --no-user-install)

==== How to run the test suite
* first write a test suite...

==== Legal
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0
International License.

To view a copy of this license,
visit http://creativecommons.org/licenses/by-sa/4.0/.

==== Configure instructions
* copy config/application.rb.default to config/application.rb
* copy config/database.yml.default to config/database.yml
* copy config/yetting.yml.default to config/yetting.yml

* edit config/application.rb, adjust mailer settings
* edit config/database.yml, adjust passwords and whatnot
* edit config/yetting.yml, adjust mailer path, passwords, etc
* edit db/seeds.rb, add or remove default data
* only used for db:setup, remember to checkout if it conflicts during an update pull
* ie. sudo -u http -H git checkout -- db/seeds.rb

==== Development instructions
* copy and install gems
git clone http://git.gwillz.com.au/gwillz/apskoala.git
bundle install --path vendor/bundle
* do 'Configure' instructions
* initialize database and run
bundle exec rake db:setup
bundle exec rails s

==== Deployment instructions
* create an app directory and clone the git repo
sudo mkdir /home/rails && cd /home/rails
sudo chown http:http ./
sudo -u http -H git clone http://git.gwillz.com.au/gwillz/apskoala.git
* install gems and compile the passenger nginx module
cd apskoala
sudo -u http -H bundle install --path vendor/bundle
sudo bundle exec ./vendor/bundle/ruby/2.2.0/bin/passenger-install-nginx-module
* do 'Configure' instructions
* setup database (use same password set in database.rb)
sudo -u postgres -H initdb --locale en_AU.UTF-8 -E UTF8 -D '/var/lib/postgres/data'
sudo systemctl start postgresql
sudo -u postgres -H psql
within the postgres shell
create role koalas with createdb login password 'allhavechlamydia';
\q
* setup assets, initialize the database, update crontab
sudo -u http -H bundle exec rake assets:precompile RAILS_ENV=production
sudo -u http -H bundle exec rake db:setup RAILS_ENV=production
sudo -u http -H bundle exec whenever --update-crontab RAILS_ENV=production
* edit /opt/nginx/conf/nginx.conf
server {
listen 80 default_server;
server_name aps.gwillz.com.au;
passenger_enabled on;
passenger_app_env production;
root /home/rails/apskoala/public;
}
* set nginx to launch on boot up
sudo cp nginx.service /etc/systemd/system
sudo systemctl enable nginx
sudo systemctl start nginx

==== Deployment update
* pull the updated software
cd /home/rails/apskoala
sudo -u http -H git pull
* migrate the database and re-compile the assets if necessary
sudo -u http -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u http -H bundle exec rake assets:clean RAILS_ENV=production
sudo -u http -H bundle exec rake assets:precompile RAILS_ENV=production
* restart nginx
sudo systemctl restart nginx