DESDEO icon indicating copy to clipboard operation
DESDEO copied to clipboard

Moving hard-coded webapi configs somewhere else

Open juropo opened this issue 8 months ago • 1 comments

Currently, the webapi in DESDEO2 (and also the old webapi) has important networking settings hard coded, like the web address where the database is located.

The information needed to connect to the database is the biggest offender here, because the database usernames and passwords should never be uploaded to github.

I would like these things to be read from environment variables. That way it would be very easy to provide the necessary information when hosting webapi on a system like kubernetes. It is also possible to provide them as a part of a command line argument or bat/shell script when running webapi somewhere else. The code could still use some default values, like localhost etc. when then environment variables haven't been defined.

A config file of some kind would be another alternative, but not as good in my opinion, because those config files would need to be stored somewhere as well, so the problem of storing database usernames and passwords on the open internet would remain.

juropo avatar Jun 11 '24 09:06 juropo