This app requires PostgreSQL.
-
Install Ruby > 2.2. (setup is tested up to Ruby 2.5 and Rails 5.0)
-
Create a user
support_central
:$ sudo adduser support_central $ sudo passwd support_central
-
Clone this repository to '/var/www/support_central':
$ sudo mkdir /var/www/support_central $ sudo chown support_central: /var/www/support_central $ sudo -u support_central -H git clone git://github.com/phusion/support_central.git /var/www/support_central $ cd /var/www/support_central
-
Open a shell as
support_central
. If you are using RVM:$ rvmsudo -u support_central -H bash $ export RAILS_ENV=production
If you are not using RVM:
$ sudo -u support_central -H bash $ export RAILS_ENV=production
-
Create a database, edit database configuration:
$ cp config/database.yml.example config/database.yml $ editor config/database.yml $ chmod 600 config/database.yml
-
Edit general configuration:
$ cp config/config.yml.example config/config.yml $ editor config/config.yml $ chmod 600 config/config.yml
-
Install the gem bundle:
$ bundle install --without development test --deployment
-
Run database migrations, generate assets:
$ bundle exec rake db:migrate assets:precompile RAILS_ENV=production
-
Create an initial set of users:
$ bundle exec rake db:seed RAILS_ENV=production
-
Generate a secret key:
$ bundle rake secret RAILS_ENV=production
Take note of the output. Create a secrets.yml and put the output in there as instructed:
$ cp config/secrets.yml.example config/secrets.yml $ editor config/secrets.yml $ chmod 600 config/secrets.yml
-
Add Nginx virtual host. Be sure to substitute the
passenger_env_var
values with appropriate values.server { listen 443; server_name www.yourhost.com; ssl_certificate ...; ssl_certificate_key ...; ssl on; root /var/www/support_central/public; passenger_enabled on; }
-
Marvel at the beauty of it all.
This guide is for non-Phusion employees. If you are a Phusion employee, please read the Phusion employee deployment guide.