forked from openshift/ruby-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for new openshift/mysql-55-centos7 image
* Don't connect to database as root user * Change user to username to avoid warning * Print out exception when we can't connect * Better debugging output (loggin user, host and port) and move it into the connection routine so we're really sure we log the correct values. * Support for old behaviour
- Loading branch information
Showing
4 changed files
with
43 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
<% # Handle old behaviour of official mysql image %> | ||
<% user = ENV.key?("MYSQL_ROOT_PASSWORD") ? "root" : ENV["MYSQL_USER"] %> | ||
<% password = ENV.key?("MYSQL_ROOT_PASSWORD") ? ENV["MYSQL_ROOT_PASSWORD"] : ENV["MYSQL_PASSWORD"] %> | ||
development: | ||
adapter: mysql2 | ||
database: <%= ENV["MYSQL_DATABASE"] %> | ||
username: root | ||
password: <%= ENV['MYSQL_ROOT_PASSWORD'] %> | ||
username: <%= user %> | ||
password: <%= password %> | ||
host: <%= ENV["DATABASE_SERVICE_HOST"] %> | ||
port: <%= ENV["DATABASE_SERVICE_PORT"] %> | ||
|
||
test: | ||
adapter: mysql2 | ||
database: <%= ENV["MYSQL_DATABASE"] %> | ||
username: root | ||
password: <%= ENV['MYSQL_ROOT_PASSWORD'] %> | ||
username: <%= user %> | ||
password: <%= password %> | ||
host: <%= ENV["DATABASE_TEST_SERVICE_HOST"] %> | ||
port: <%= ENV["DATABASE_TEST_SERVICE_PORT"] %> | ||
|
||
production: | ||
adapter: mysql2 | ||
database: <%= ENV["MYSQL_DATABASE"] %> | ||
username: root | ||
password: <%= ENV['MYSQL_ROOT_PASSWORD'] %> | ||
username: <%= user %> | ||
password: <%= password %> | ||
host: <%= ENV["DATABASE_SERVICE_HOST"] %> | ||
port: <%= ENV["DATABASE_SERVICE_PORT"] %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters