Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Latest commit

 

History

History
48 lines (32 loc) · 1.71 KB

README.md

File metadata and controls

48 lines (32 loc) · 1.71 KB

Moving People Safely

Code Climate

Dependency Version
Ruby 2.3.0
Rails 4.2.5.1
Postgres 9.4.5
Webkit HTML to PDF 0.12.3
Font: Liberation Sans 12 Jan 2009 version

Configuration

Local Setup

FONTS

The PDF output relies on the Liberation Sans font being present on the host machine. You can find the relevant fonts in the fonts/ directory. You should be able to add them to OS X by double clicking the font.

The Dockerfile is responsible for setting up the fonts from the repo on the container. It also includes a font configuration file required to fix font hinting and anti-aliasing in the container when generating PDF's.

Environment Variables

SECRET_KEY_BASE

This key is used to verify the integrity of signed cookies. If it is changed, all old signed cookies will become invalid.

Make sure the secret is at least 30 characters and all random, no regular words or you’ll be exposed to dictionary attacks. You can use rake secret to generate a secure secret key.

The framework we use for managing user authentication (Devise) also requires this to be set in production in order to generate user tokens.

SERVICE_URL

This is used to build links in emails(invitation, password reset etc). It must be set in the production environment to https://mps-prod.dsd.io/.

SMTP_USERNAME, SMTP_PASSWORD, SMTP_HOSTNAME, SMTP_PORT, SMTP_DOMAIN

These configure email delivery in the production environment.