Skip to content

Instantly share code, notes, and snippets.

PURR DIGITAL - Rails Deployment Guide (January 2019)

sfg Certain sites/apps will have different setup tools (e.g - AWS for JumpQ and Dan Harris for MFPA) - And specific instructions should be written in individual repos for them. But by and large - we manage our own Bytemark servers running on Debian. The deployment tool of choice is Capistrano. It's ace for managing all required tasks that need to be ran on every deployment - as well as keeping 5-6 full backup versions on the server which can be fallen back on should a deployment fail.

A really good guide to setting up the capistrano can be found here, which deals with the full process of hooking up with Git / connecting it to your server / deployment commands.

You can also set up cap configuration for different environments here - so if you need to set up configuration for a separate staging and production site then you can can do.

@james-purr
james-purr / gist:3f32424ed31b4dd5889b0c9a02a9f914
Last active January 30, 2019 13:47
PURR DIGITAL - Rails standard setup /best practises guide (July 2018)

PURR DIGITAL - Rails standard setup guide (July 2018)

A guide to maintain a consistent standard of how we set up and maintain rails projects - aim to keep up with best practises and project familiarity between team members.

INITIAL SETUP:

Before setting up - always check we are using the latest version of ruby and rails. (rvm list known)

DATABASE:

  • create project with postgresql (rails new myapp --database=postgresql) - unless a project demands something specifically for speed/handling huge amount of records like mongodb (if app is api-only, run rails new my_api --api)