Git Product home page Git Product logo

passenger_status_service's Introduction

About the Passenger Status Service

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.

The problem with Passenger status reports 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.

Passenger Status Service overview

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.

Hosted service vs self-hosting

The Passenger Status Service is an open source Rails app. Phusion provides a hosted version at https://status-service.phusionpassenger.com. To get started, sign up for an account.

The hosted version is easy to use, but the disadvantage is that we will have access to your data. Wondering what data is sent?. You can also choose to self-host this service. That way, you are in control of all your data.

Self-hosting guide

This app requires PostgreSQL.

  1. Install Ruby 2.2.

  2. Install Nginx + Passenger.

  3. Create a user passenger_status_service:

    $ sudo adduser passenger_status_service
    $ sudo passwd passenger_status_service
    
  4. 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
    
  5. 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
    
  6. Create a database, edit database configuration:

    $ cp config/database.yml.example config/database.yml
    $ editor config/database.yml
    
  7. Install the gem bundle:

    $ bundle install --without development test --deployment
    
  8. Run database migrations, generate assets:

    $ bundle exec rake db:migrate assets:precompile
    
  9. Create an admin user:

    $ bundle exec rake admin:create
    Email: ...
    Password: ...
    Confirm password: ...
    Admin user created.
    
  10. Generate a secret key:

    $ bundle rake secret

    Take note of the output. You need it in the next step.

  11. 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 [email protected];
       # 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 ...;
    

    }

passenger_status_service's People

Contributors

foobarwidget avatar acrogenesis avatar camjn avatar scarhand avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.