Welcome to the Passenger Status Service. This is a service provided by Phusion for the Passenger application server. This service makes Passenger status reports (the passenger-status
tool) work on Heroku.
Passenger status reports are gathered by running a the passenger-status
tool, which queries a Passenger instance running on the same machine. However, Heroku does not provide SSH access to the servers on which your app is running, so it is not possible to run the passenger-status
tool to obtain a status report from Passenger. The heroku console
command spawns a one-off dyno instead of granting you access to the running servers, so that doesn't work either.
The Passenger Status Service solves this problem. It works as follows:
- You add a reporting command to your Procfile. This reporting command gathers a status report from the local Heroku server and posts it to the Passenger Status Service.
- You view the status reports through the Passenger Status Service.
This app requires PostgreSQL.
-
Install Ruby 2.2.
-
Create a user
passenger_status_service
:$ sudo adduser passenger_status_service $ sudo passwd passenger_status_service
-
Clone this repository to '/var/www/passenger_status_service':
$ sudo mkdir /var/www/passenger_status_service $ sudo chown passenger_status_service: /var/www/passenger_status_service $ sudo -u passenger_status_service -H git clone git://github.com/phusion/passenger_status_service.git /var/www/passenger_status_service $ cd /var/www/passenger_status_service
-
Open a shell as
passenger_status_service
. If you are using RVM:$ rvmsudo -u passenger_status_service -H bash $ export RAILS_ENV=production
If you are not using RVM:
$ sudo -u passenger_status_service -H bash $ export RAILS_ENV=production
-
Create a database, edit database configuration:
$ cp config/database.yml.example config/database.yml $ editor config/database.yml
-
Install the gem bundle:
$ bundle install --without development test --deployment
-
Run database migrations, generate assets:
$ bundle exec rake db:migrate assets:precompile
-
Create an admin user:
$ bundle exec rake admin:create Email: ... Password: ... Confirm password: ... Admin user created.
-
Generate a secret key:
$ bundle rake secret
Take note of the output. You need it in the next step.
-
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/passenger_status_service/public; passenger_enabled on;
# Fill in an appropriate value for email 'From' fields. passenger_env_var MAILER_SENDER yourapp@yourdomain.com; # Fill in the root URL of the app. passenger_env_var ROOT_URL https://www.yourhost.com; # Fill in value of secret key you generated in step 10. passenger_env_var SECRET_KEY_BASE ...;
}