{"action":"closed","issue":{"url":"https://api.github.com/repos/thuss/standalone-migrations/issues/139","repository_url":"https://api.github.com/repos/thuss/standalone-migrations","labels_url":"https://api.github.com/repos/thuss/standalone-migrations/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/thuss/standalone-migrations/issues/139/comments","events_url":"https://api.github.com/repos/thuss/standalone-migrations/issues/139/events","html_url":"https://github.com/thuss/standalone-migrations/issues/139","id":296836414,"number":139,"title":"Environment variables in db/config.yml","user":{"login":"fernandoaleman","id":523634,"avatar_url":"https://avatars2.githubusercontent.com/u/523634?v=4","gravatar_id":"","url":"https://api.github.com/users/fernandoaleman","html_url":"https://github.com/fernandoaleman","followers_url":"https://api.github.com/users/fernandoaleman/followers","following_url":"https://api.github.com/users/fernandoaleman/following{/other_user}","gists_url":"https://api.github.com/users/fernandoaleman/gists{/gist_id}","starred_url":"https://api.github.com/users/fernandoaleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fernandoaleman/subscriptions","organizations_url":"https://api.github.com/users/fernandoaleman/orgs","repos_url":"https://api.github.com/users/fernandoaleman/repos","events_url":"https://api.github.com/users/fernandoaleman/events{/privacy}","received_events_url":"https://api.github.com/users/fernandoaleman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-13T18:16:15Z","updated_at":"2018-04-30T16:53:23Z","closed_at":"2018-04-30T16:53:23Z","author_association":"NONE","body":"Is it possible to use environment variables in the `db/config.yml` file? Normally we use Rails for our apps, but we are currently maintaining a legacy PHP app. `standalone-migrations` works great in the PHP app out-of-the-box, but we'd like to be able to keep consistent with using environment variables.\r\n\r\nWe've tried all the variations below with no luck. Any suggestions?\r\n\r\n```php\r\ndevelopment:\r\n  adapter: mysql2\r\n  encoding: utf8\r\n  database: ENV['MYSQL_DATABASE']\r\n  username: ENV['MYSQL_USER']\r\n  password: ENV['MYSQL_PASSWORD']\r\n  pool: 5\r\n  timeout: 5000\r\n  host: ENV['MYSQL_HOST']\r\n```\r\n\r\n```php\r\ndevelopment:\r\n  adapter: mysql2\r\n  encoding: utf8\r\n  database: getenv('MYSQL_DATABASE')\r\n  username: getenv('MYSQL_USER')\r\n  password: getenv('MYSQL_PASSWORD')\r\n  pool: 5\r\n  timeout: 5000\r\n  host: getenv('MYSQL_HOST')\r\n```\r\n\r\n```php\r\ndevelopment:\r\n  adapter: mysql2\r\n  encoding: utf8\r\n  database: ${MYSQL_DATABASE}\r\n  username: ${MYSQL_USER}\r\n  password: ${MYSQL_PASSWORD}\r\n  pool: 5\r\n  timeout: 5000\r\n  host: ${MYSQL_HOST}\r\n```"}}
{"actor":{"display_login":"thuss"}}