From 9366200d96168141484ceaf769b383f27c054b88 Mon Sep 17 00:00:00 2001 From: Sybil <root@nickel> Date: Wed, 21 Oct 2015 17:43:49 +0200 Subject: [PATCH] Using env' variables to protect configuration data. --- Procfile | 4 ++-- config/database.yml | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Procfile b/Procfile index b6a0c27..3c782b2 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -web: bundle exec rails s -p 3002 -worker: bundle exec sidekiq +web: bundle exec rails s -p 3001 #-p 3002 +#worker: bundle exec sidekiq diff --git a/config/database.yml b/config/database.yml index 2ae1f48..a246f0d 100644 --- a/config/database.yml +++ b/config/database.yml @@ -12,10 +12,12 @@ development: adapter: mysql2 encoding: utf8 - database: **** <database name> + database: <%= ENV["PLAYBOT_DB"] %> pool: 5 - username: **** <database user> - password: **** <database password> + username: <%= ENV["PLAYBOT_DB_USER"] %> + password: <%= ENV["PLAYBOT_DB_PWD"] %> + host: <%= ENV["PLAYBOT_DB_HOST"] %> + port: <%= ENV["PLAYBOT_DB_PORT"] %> #development: # <<: *default -- GitLab