helpdesk-z / helpdeskz-dev

HelpDeskZ is a free PHP based software which allows you to manage your site's support with a web-based support ticket system.
http://www.helpdeskz.com/
GNU General Public License v2.0
83 stars 64 forks source link

Load configuration from env #21

Open lakuapik opened 3 years ago

lakuapik commented 3 years ago

Hi, i see the documentation here https://docs.helpdeskz.com/en/latest/installation/#configuration-file says we should copy the Helpdesk.new.php to Helpdesk.php to change the configuration.

Is it possible to load configuration from os environment or .env file?

In my case, i would like to deploy helpdeskz to docker and set configuration on the fly without copying the config file.

Thanks for the amazing work!

helpdesk-z commented 3 years ago

Hi, apologies for this delay, as HDZ is using codeigniter, .env file can be used with this framework: https://codeigniter.com/user_guide/general/configuration.html

lakuapik commented 3 years ago

Hi, i dont really understand codeignitier but i've been trying to use the .env file or setting up the os environment and it doesnt seems to work for me. Could you please give me a guide?

lakuapik commented 3 years ago

I think it doesnt work because of here

https://github.com/helpdesk-z/helpdeskz-dev/blob/4ed1a685d9f24741dc4c2393a6c098079175808c/hdz/app/Config/Database.php#L95-L100

it uses Helpdesk constant instead of loading from configuration/env? #idk #cmiiw