ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

ChiliProject + Nginx + Passenger on a Raspberry Pi

Added by Brian Milco at 2013-02-02 08:59 pm

Hi,

I wrote a blog post (http://brianmilco.blogspot.com/2013/02/chiliproject-nginx-and-passenger-on.html) yesterday on how to setup ChiliProject, Nginx, and Passenger on a Raspberry Pi. I don't really use Ruby except to run this project so if you see anything that could be improved I'd appreciate it.

This process was used to get ChiliProject 3.6.0 working on Raspbian Server Edition (http://sirlagz.net/tag/raspbian-server-edition/) which is a striped down version of Raspbian.

Performance is ok. First connections are very slow, subsequent page loads are acceptable to me. If you only plan to have one user connect at a time it should be fine.

Below I've summarized the steps without comment, please read the blog post for detailed instructions.

-un-install any existing nginx/passengers installed from debs.

sudo apt-get install rubygems libcurl4-openssl-dev libssl-dev libmysqlclient-dev libpq-dev libmagickcore-dev libmagickwand-dev libsqlite3-dev bundler
sudo gem install passenger
sudo passenger-install-nginx-module

The bare minimum nginx configuration you need to add:

passenger_root /var/lib/gems/1.8/gems/passenger-3.0.19;
passenger_ruby /usr/bin/ruby1.8;

server {
    listen      80;
    server_name  chiliproject.lan;

    root /srv/www/public;
    passenger_enabled on;
}
sudo bundle install [--without test development]

Continue from the official ChiliProject installation or upgrade guides, I tried both and they worked flawlessly.


Replies (2)

RE: ChiliProject + Nginx + Passenger on a Raspberry Pi - Added by Felix Schäfer at 2013-02-03 04:38 pm

Brian Milco wrote:

First connections are very slow, subsequent page loads are acceptable to me.

This might be due to your passenger configuration. IIRC the default passenger configuration states that processes are shut down after a certain period of inactivity, which means after a certain period of time the first connection hast to cold boot ChiliProject again, which takes some time. See if you can change your Passenger config to use 2 processes and have them killed only after so many connections (1000-5000 should be fine) instead of after a period of inactivity.

RE: ChiliProject + Nginx + Passenger on a Raspberry Pi - Added by Brian Milco at 2013-02-08 08:28 am

Thanks for the suggestion. I did a little Googling and looked at the Passenger docs and found the following:

passenger_pool_idle_time - how long before the server shuts down the application processes (in seconds).
passenger_min_instances - minimum number of processes to keep alive despite the idle time above.

Both settings make a difference on their own, and they appear to work at least as well in combination.

In your nginx configuration--

In the http block:

passenger_pool_idle_time 604800; # 1 week in seconds

In the server block:

passenger_min_instances 1;

(1-2/2)