Skip to content

Instantly share code, notes, and snippets.

@little9
Last active August 29, 2015 14:19
Show Gist options
  • Save little9/61871264c65907c5c3a2 to your computer and use it in GitHub Desktop.
Save little9/61871264c65907c5c3a2 to your computer and use it in GitHub Desktop.
Rails Passenger Deployment Checklist
  • Here's an example Apache config (don't use friendly error pages in production):
Alias /aptrust-tracking /var/www/html/aptrust-tracking/public
    <Location /aptrust-tracking>
        PassengerBaseURI /aptrust-tracking
        PassengerAppRoot /var/www/html/aptrust-tracking
        PassengerFriendlyErrorPages on
    </Location>
    <Directory /var/www/html/aptrust-tracking/>
        Allow from all
        Options -MultiViews
    </Directory>
  • Set a secret key environment variable for the secrets.yml file at the command line or in the file itself (Don't put it in the Git repo!)

    export SECRET_KEY_BASE=reallysecurekey
    
  • Turn on compile assets in config/environments/production.rb

    config.assets.compile = true
    
  • You can restart the Rails application by creating or modifying the file tmp/restart.txt in the Rack application’s root folder. Passenger will automatically restart the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment