helpdesk-z/helpdeskz-dev

Load configuration from env

lakuapik opened this issue · 3 comments

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!

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

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?

I think it doesnt work because of here

$this->default['hostname'] = Helpdesk::DB_HOST;
$this->default['username'] = Helpdesk::DB_USER;
$this->default['password'] = Helpdesk::DB_PASSWORD;
$this->default['database'] = Helpdesk::DB_NAME;
$this->default['DBPrefix'] = Helpdesk::DB_PREFIX;
$this->default['port'] = Helpdesk::DB_PORT;

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