Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use DATABASE_URL for MySQL #2231

Closed
halilim opened this issue Apr 16, 2019 · 3 comments
Closed

Use DATABASE_URL for MySQL #2231

halilim opened this issue Apr 16, 2019 · 3 comments
Labels
bug Verified and replicated bugs and issues.

Comments

@halilim
Copy link

halilim commented Apr 16, 2019

Description

  • Currently the database config uses hardcoded values for Forge instead of making use of DATABASE_URL environment variable.

Solution
Use $host, $database, $username and $password variables in MySQL config, similar to PostgreSQL; and default to existing Forge values in case of absence. Additionally, a $port variable can be extracted from $databaseUrl and used similarly.

Additional context
I am trying to install Firefly III on a Dokku instance. Dokku describes itself as a "mini-Heroku". It makes use of DATABASE_URL in the same way. Thus, I think this change would be useful for Heroku MySQL/MariaDB add-ons and Dokku MySQL/MariaDB plugins.

I can create a pull request. I just wanted to discuss this first per the contribution guideline. And I noticed there is a sqlsrv config too, which should be able to function the same way.

@JC5
Copy link
Member

JC5 commented Apr 16, 2019

That's a good idea. I have some changes lined up for those files, for the upgrade to 4.8.0. Could you hold this until 4.8.0 is released?

@JC5 JC5 added the bug Verified and replicated bugs and issues. label Apr 16, 2019
@halilim
Copy link
Author

halilim commented Apr 16, 2019

Sure thing, waiting for 4.8.0 then (& using dokku config:set FF_DB_... in the meantime).

@JC5
Copy link
Member

JC5 commented Apr 16, 2019

@JC5 JC5 closed this as completed Apr 16, 2019
JC5 added a commit that referenced this issue Sep 8, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified and replicated bugs and issues.
Projects
None yet
Development

No branches or pull requests

2 participants