charles-001 / dolphie

Your single pane of glass for real-time analytics into MySQL/MariaDB & ProxySQL
https://pypi.org/project/dolphie/
GNU General Public License v3.0
651 stars 40 forks source link

Default config location #52

Closed r0van closed 8 months ago

r0van commented 8 months ago

Hi,

firstly thanks for dolphie, love it!

Our use case for dolphie is to deploy it on every mysql instance in our company. Its better than locally connecting to mysql on server. Just ssh to server and type dolphie for super fast debuging.

However when i want to deploy dolphie on every instance via ansible, there is problem with config. I have to copy dolphie config into every users home dir for easy use. I understand why you set default to ~/.dolphie but for easy deploy via ansible maybe using /etc/dolphie.conf (or somethink like that) would be better?

What do you think? I know its slightly different use case than connecting to mysql server from desktop, but in big enviroment is easier.

Thx.

charles-001 commented 8 months ago

Hi @r0van - thanks for reaching out! I'm glad you and your teammates are enjoying Dolphie! I think a good solution here is to have 2 config paths as default with the home directory taking precedence:

  1. /etc/dolphie.cnf
  2. ~/.dolphie.cnf

How's that work for you?

r0van commented 8 months ago

Sounds great, /etc/dolphie.cnf is much better for ansible. I was thinking what about mysql config. Default for --mycnf-file can be /etc/my.cnf for consistency? But for us dolphie config in etc is great. So up to you :)

Thx a lot!

charles-001 commented 8 months ago

@r0van - The rest of the config files can stay local in the user's home directory by default since if someone wants to change them, they can in Dolphie's config file.

charles-001 commented 8 months ago

This is now in v4.3.1