Displaying 1 result from an estimated 1 matches for "dev_database_usernam".
Did you mean:
dev_database_username
2006 Jul 31
4
switching database dynamically based on incoming request
...enviroment variables set for the fcgid process in general]
In principle we could do the same for the database by adjusting
database.yml like so:
development:
adapter: mysql
database: <%= request.env[''DEV_DATABASE''] %>
host: localhost
username: <%= request.env[''DEV_DATABASE_USERNAME'']
password: <%= request.env[''DEV_DATABASE_PASSWORD'']
The idea being to have a virtual host config like:
<VirtualHost virtualhost1.us.com:80>
ServerName virtualhost1.us.com
SetEnv DEV_DATABASE virtualhost1
SetEnv DEV_DATABASE_USERNAME virtualhost1_username
SetE...