ucsdlib / hifive

An application supporting an Employee Recognition program workflow
MIT License
0 stars 0 forks source link

Refactor database environment variables #321

Closed mcritchlow closed 5 years ago

mcritchlow commented 5 years ago

Descriptive summary

Currently we have named environment variables with their environment burned into the variable name itself. Examples:

database: <%= ENV.fetch("APPS_H5_STAGING_DATABASE") %>

database: <%= ENV.fetch("APPS_H5_PROD_DATABASE") %>

This uses an older pattern for environment variables, and really shouldn't be necessary anymore. If we can rename/refactor these out to simply:

database: <%= ENV.fetch("APPS_H5_DATABASE") %>

Then we can have a single database setup block in database.yml.

This would also force/allow us to drop the use of DATABASE_URL so we are consistent across all environments as to how we do database setup.

Rationale

Cleanup and prep towards #301