Ubuntu 16.04 now available


  • Ubuntu 16.04 has been added to the list of supported distributions for all languages (Python, Ruby, Go, Node)
  • Fedora 20 will stop being supported on September 1st 2016.
  • Ruby 2.3.1 is supported since a few weeks now, and the next Ruby versions will automatically be available without any change from our side, thanks to using an on-demand build server.

Python support in beta

Last updated: Wed, 25 May 2016 17:02:03 GMT 0 comments

The python buildpack has just been added to Packager.io. You can now package and serve all your python apps for Ubuntu, Debian, CentOS/RHEL, and SuSE distributions!

To test it, just enable your python app, trigger a build, and it should just work! If not, please send an email at support@packager.io

For reference, we're using the official Heroku python buildpack, with only minor changes to get precompiled python binaries for your target platform(s).

Auto-removal of branches


For those of you who use a lot of short-lived branches, and build packages for all of them, it may have been slightly annoying to not have those branches removed from Packager.io when you remove them from your git repository.

This is no longer the case, as branch presence is now kept in sync with your repository. We also went back in time and removed any existing branch on Packager.io that is no longer present in the corresponding git repository.

Happy packaging!

Debian 8, CentOS/RHEL 7, and SLES 12 now available for automated packaging


Rejoice, we've just added official support for 3 more distributions! The latest Debian stable ("jessie"), CentOS/RHEL 7, and last but not least Suse Linux Enterprise Server 12. Which means with every code push you can now automatically package and publish your Rails, NodeJS, or Go app for up to 8 target distributions!

Happy packaging!

How to run your packaged Rails app with Passenger


When you package a Rails application on Packager.io, by default you'll end up with init scripts to run your application with the web server you defined in your Procfile. This allows you to install the package on any server and get your application running very easily with my-app scale web=1.

However, if you're already using Passenger for your deployments, you might want to keep it that way, in which case you can still benefit from the ease of installation provided by packages, but serve your application using Passenger.

In the rest of this article, we're assuming that nginx and Passenger are already installed on your server, and that your application name is my-app. You can very easily adapt the following instructions for apache2 + Passenger.

Add a new file to your repository

Passenger will need to know which ruby you want to use to load the application. We could directly point to the ruby binary embedded with your package, however it would not load any of the environment variables that you defined, which would not allow the application to start properly. The easiest way to fix this is to create a new file that will delegate any arguments to the CLI that comes with every package, which will take care of all of this for you.

For instance, you could create a new file in packaging/ruby with the following content:

exec "/usr/bin/my-app" "run" "ruby" "$@"

Then give it the right permissions, commit to your repository and push:

chmod a+x packaging/ruby
git add packaging/ruby
git commit -m "Add packaging/ruby"
git push

Wait a few seconds until your new package is generated, then install it on your server with the usual instructions.

Update your nginx server configuration

We can now simply update the nginx configuration so that the passenger_ruby configuration option points to your application's ruby. A minimal nginx configuration would look like:

server {
    listen 80;
    server_name my-server.com;
    root /opt/my-app/public;

    passenger_enabled on;
    passenger_ruby /opt/my-app/packaging/ruby;

Reload nginx:

service nginx reload

That's it! Passenger should now load and serve your application when you access http://my-server.com:80.

Bonus points: automatically migrate and restart your application after an update

Passenger provides a mechanism to restart your application by touching a specific file at tmp/restart.txt. We can choose to automate this process by adding a postinstall hook to our package, and we'll also automatically run the database migrations if a DATABASE_URL is properly set:

In your .pkgr.yml file add the following line:

after_install: packaging/hooks/postinstall.sh

Now create a new file at packaging/hooks/postinstall.sh with the following content:

set -e

if my-app config:get DATABASE_URL ; then
    my-app run rake db:migrate

touch tmp/restart.txt

exit 0

Finally, add and commit these files to your repository and push to generate a new package:

git add .pkgr.yml packaging/hooks/postinstall
git commit -m "Automatically migrate and restart our app"
git push

Now, every time you install a new version of your package, migrations will be run and Passenger will restart your application.

Happy packaging!

OpenProject – installation made easy


OpenProject is currently the most active project on our platform, with more than 10000 package downloads and 1500+ active installations over the world. Below is a screenshot of their download map a few days ago:

Head over their blog post to learn more about their use of the Packager.io service.

Packing Joola with Packager.io


Joola is a data middleware for building custom analytics applications, written in NodeJS. And they just wrote a great blog post explaining how easy it is to package and distribute a NodeJS app for several distributions using Packager.io.

Also, the rationale behind their decision should be familiar to anyone who has ever wanted to distribute a NodeJS app:

However, while [installing via npm] works well for developers, it's not ideal for users for several reasons:

  • Every time your install Joola, it needs to download and install all the dependencies.
  • Some dependencies require compilation, which may fail.
  • Dependencies have their own life-cycle, so we might have a situation where a user is using a newer dependency package than one we've tested.
  • The installation process can be lengthy if we include the geo-ip dictionary for IP lookups.
  • npm is designed for libraries, so the user ends up with ./node_modules/joola instead of using "proper" system folders.
  • npm installation process does not relate to group, user, directories, permissions etc... creation, so we're quite limited in providing Joola as a service.
  • Users can install the package either globally or locally and we want to have uniformed configuration/logging/etc... folders.

Check out the full blog post !

Ruby 2.2.0 available


It took a bit longer than expected, but Ruby 2.2.0 is now available on Packager.io.

Happy packaging!

Skip a build with [skip ci]


Many hosted CI services allow to skip a build by including either [ci skip] or [skip ci] into a commit.

Packager now follows this convention and will not run a build if the latest commit includes one of those tags in the message.

This does not apply when manually launching a build from the web interface. In that case, you keep your superpowers!

Ruby 2.1.5 available


Ruby 2.1.5 has been released, and is now available on Packager. Please see the documentation for the list of available ruby versions.