Docker icon indicating copy to clipboard operation
Docker copied to clipboard

APP_DEBUG flag typo in documentation

Open MarekPikula opened this issue 5 years ago • 6 comments

After update to 2.4.0 Docker image I have phpdebugbar always visible. How can I disable it?

MarekPikula avatar Jan 27 '20 16:01 MarekPikula

You can disable it by setting APP_DEBUG=false in the docker-compose.yml, with the other environment variables.

octylFractal avatar Jan 28 '20 22:01 octylFractal

There appears to be a typo in the docker-compose.yml. It has DEBUG=FALSE, when it should be APP_DEBUG=false as the .env.docker uses APP_DEBUG.

sxldier avatar Jan 29 '20 22:01 sxldier

Also typo is in main readme: https://github.com/CachetHQ/Docker#debugging

MarekPikula avatar Jan 29 '20 22:01 MarekPikula

After changing DEBUG to APP_DEBUG it works as expected.

Also I think that default (production) behaviour should be APP_DEBUG=false. What do you think about changing it?

MarekPikula avatar Jan 29 '20 22:01 MarekPikula

DEBUG is actually intentional, and toggles bash -x within the entrypoint.sh script:

https://github.com/CachetHQ/Docker/blob/0d857ba20d1059021151ae68383cdc36d49418f9/entrypoint.sh#L4

APP_DEBUG is a separate setting, which is not included in the docker-compose.yml, and defaults to true if not set:

https://github.com/CachetHQ/Docker/blob/0d857ba20d1059021151ae68383cdc36d49418f9/entrypoint.sh#L75

I suppose this is somewhat confusing, and would not be opposed to either combining the two different debugs or just setting the default to be "safer" (i.e. false). Some of the current CI tests rely on APP_DEBUG=true output I think, so any changes may need to explicitly enable the APP_DEBUG=true just in CI / development. This is actually what is blocking https://github.com/CachetHQ/Docker/pull/338 currently. https://github.com/CachetHQ/Docker/pull/355 seems to be on a similar track as this also.

djdefi avatar Jan 30 '20 01:01 djdefi

I guess it can be closed?

MarekPikula avatar Jun 03 '23 01:06 MarekPikula