-
Notifications
You must be signed in to change notification settings - Fork 57
Configuration
In order to configure a deployment of Reservations, there are a number of environment variables that need to be set. We're using dotenv and dotenv-deployment to simulate the presence of environment variables for Rails in situations where they aren't actually defined in the system, but these do not need to be used. The following document details the environment variables that need to be set and how they are used.
The presence of this environment variable determines whether or not to use CAS authentication (if it is present / defined to any value, CAS authentication is used). The decision of whether or not to use it should be made even before the initial setup for the application as it will modify the creation of the first user / superuser. The switching of authentication methods from CAS to e-mail/password is not supported by Reservations (for more information see here). If CAS authentication is used, the following environment variable must be defined.
This environment variable defines the base url of the CAS authentication server (e.g. https://secure.its.yale.edu/cas/
). It is only necessary if using CAS authentication.
This environment variable stores the secret key used by Devise to generate random tokens. It should be set to a random token which can be generated by rake secret
(produces a pseudo-random 128-character hexidecimal string).
This environment variable stores the "pepper" used by devise to help generate encrypted passwords. It should be set to a random token Like DEVISE_SECRET_KEY
. It is only necessary if using e-mail / password authentication.
This environment variable is used to configure Reservations for subdirectory deployment, e.g example.com/reservations
. It should be set to the relative location of the application root (e.g. /reservations
).
This environment variable stores the secret key used by Rails to sign cookies / sessions. It should be set to a random token like DEVISE_SECRET_KEY
and DEVISE_PEPPER
.
This environment variable stores the name of the database that will be used in production (see config/database.yml.example.production
). A simple example might be reservations_production
.
This environment variable stores the MySQL or PostgreSQL username used to access the database.
This environment variable stores the MySQL or PostgreSQL password used to acccess the database.
This environment variable stores the hostname or location of the MySQL or PostgreSQL database server. For applications where the application server also serves as the database server this might be localhost
.
This environment variable stores the hostname or location of the SMTP server used for sending e-mails, e.g. smtp.example.com
.
This environment variable stores the port used to talk to the SMTP server, e.g. 587
.
This environment variable stores the domain used to send e-mails from, e.g. example.com
.
This environment variable determines whether or not the SMTP server accepts authentication. Like CAS_AUTH
, set it to anything to turn on SMTP authentication. If it is set, the following two environment variables must be defined.
This environment variable stores the username for SMTP authentication. It is only required if RES_SMTP_AUTH
is set.
This environment variable stores the password for SMTP authentication. It is only required if RES_SMTP_AUTH
is set.