opensourcepos / opensourcepos

Open Source Point of Sale is a web based point of sale application written in PHP using CodeIgniter framework. It uses MySQL as the data back end and has a Bootstrap 3 based user interface.

Home Page:http://www.opensourcepos.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Harmonize configuration for docker/host setup

jekkos opened this issue · comments

I Did a couple of pushes on the ci4-branch and I've got my dev env running again now, in docker, at last.

There's one thing I'd like to improve which is the config loading. Currently the .env file is used to configure database access. In docker this used to be done through env variables. Those are overwrriten by what is in the .env file, so this is currently broken.

First I was looking for an easy way to prevent the dotenv from overwriting existing environment variables, so if a variable already exists, .env should not touch it. This should only be the case when you run something in docker. The compose files currently have the credentials setup this way.

Or another option is to build a .env file and copy it to the container. From a docker perspective, that might be less transparant and not what you would expect. But the upside is that no special code is needed to handle these overrides.
Will sleep over it and decide on how to tackle this later on.

Another issue is that currenty xdebug is not working anymore, so that also needs another look.

XDebug is working again now. Docker config now overrides the settings in .env file, as it should.

Latest ci4-branch is now deployed on dev. There was a small hiccup in the migration which was that the backup folder was not created. I have fixed this also.