Thanks to everyone who came out to see my presentation at CPOSC yesterday.
I’ve posted a copy of my slides on SlideShare. Here’s a list of resources that I’ve used in setting up nginx, Unicorn, and Capistrano.
Here’s the Github repository for the small example I showed at the end of the presentation. In the
sample_config_files directory there are a few files that are not actually part of the Rails project but instead are config files that would be found on the server:
- nginx_site.conf: This is an example of the nginx configuration used to proxy requests to Unicorn
- unicorn_init: I didn’t talk about this in the presentation, but this is an example of a file that can be placed in
/etc/init.dand used to start Unicorn on machine startup
- cposc.conf: This is the project-specific configuration file used by the above
- Unicorn home page
- A blog post by Simon Hørup Eskildsen on setting up Unicorn and nginx. Good general information.
- A blog post from Matteo Depalo on migrating from Heroku to Digital Ocean. This helped inspire me to do this myself. Matteo’s post talks about using Chef to set up your server in addition to the Unicorn/nginx/Capistrano combination. My personal choice is to use Ansible for configuration management.
- Github’s post about switching to Unicorn.
- Github’s “unofficial” Unicorn source code mirror. This
examplesdirectory has sample configuration files for Unicorn, nginx, and logrotate with lots of comments.
- nginx home page
- nginx config documentation
- Documentation on the upstream configuration used to reverse proxy to Unicorn.
Capistrano recently released a new version (3.0) that makes some changes to how Capistrano is configured and runs. I’ve only used the 2.x version and that’s what I covered in my presentation. The Capistrano website has information on the new version; I’ve used the Github wiki when setting up version 2.x.
These are the Linux hosts I mentioned during my presentation; there are certainly a lot more.
Thanks to all of the other speakers and the conference organizers for an enjoyable day. I also had a fun lunch discussion with Scott, Stefan, Samrat, Hector, Jeff, and Nathan (sorry if I missed anyone!).
If you have any questions about my presentation, feel free to reach out on Twitter or by email.