View prepare-commit-msg.sh
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
View deploy.rb
HEROKU_APP = ARGV[0]
raise 'Heroku application name argument is missing. (e.g. \'ruby lib/tasks/teamcity/heroku/deploy.rb elcurator-staging\')' unless HEROKU_APP
HEROKU_GIT_URL = "git@heroku.com:#{HEROKU_APP}.git"
TEMP_DIFF_REMOTE = 'temp_diff_remote'
# Check if there is migrations to run
puts `git remote add #{TEMP_DIFF_REMOTE} #{HEROKU_GIT_URL}`
puts `git fetch #{TEMP_DIFF_REMOTE}`
there_is_migrations_to_run = !`git diff HEAD #{TEMP_DIFF_REMOTE}/master db/migrate`.empty?
View sizing_your_rails_application_with_unicorn_on_heroku.md

Sizing your Rails application with Unicorn on Heroku

This tutorial assumes you are running a Rails application on Heroku with a Unicorn server. However, if you are not using one of those you will find some general information which can help you in your context.

This article will help you to correctly configure your Unicorn server based on real data.

I recommend you to use New Relic, which is really easy to setup with Rails & Heroku. It will help you monitoring your application and configure it at its best.

Using Unicorn Web Server

View rails_mailer_structure.md

Rails mailer structure

Your application is growing, and you are starting to have a complex mailing system: notification emails, retention emails, misc user emails, admin emails, etc...

It's time to clean up your mailers !

Existing mailer

You may already have a single mailer, responsible of every emails, like this one:

View heroku_application_migration.md

Migrating an Heroku Application to another

The usecase here is to migrate an Heroku Application to Heroku Europe, and minimise downtime.

The heroku documentation on this subject is quite complete.
It is recommanded to read it if you are planning a migration.
https://devcenter.heroku.com/articles/app-migration

Process

In this guide, sourceapp is the original (source) app and targetapp is the migrated (target) app.