From: Aidan Cornelius-Bell Date: Sun, 15 Sep 2024 01:04:43 +0000 (+0930) Subject: Env getters X-Git-Url: https://gitweb.mndrdr.org/?a=commitdiff_plain;h=e88f3cf035c0c44ee961d7a3d36fb9036290b2a3;p=arelpe.git Env getters --- diff --git a/Gemfile b/Gemfile index 586b800..24385f8 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,8 @@ gem "redcarpet" gem "rouge" #html crawling gem "httparty" - +#environment stuff +gem "dotenv" # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] # gem "kredis" @@ -41,8 +42,6 @@ group :development, :test do # Static analysis for security vulnerabilities [https://brakemanscanner.org/] gem "brakeman", require: false - gem "dotenv" - # Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/] gem "rubocop-rails-omakase", require: false end diff --git a/config/database.yml b/config/database.yml index 7bf42f8..3518775 100644 --- a/config/database.yml +++ b/config/database.yml @@ -51,5 +51,7 @@ test: production: <<: *default database: arelpe_production - username: arelpe - password: <%= ENV["ARELPE_DATABASE_PASSWORD"] %> + password: <%= ENV.fetch("MYSQL_PASSWORD") %> + host: <%= ENV.fetch("MYSQL_HOST") % + username: <%= ENV.fetch("MYSQL_USERNAME") %> + password: <%= ENV.fetch("MYSQL_PASSWORD") %>