cachethq / Docker

A Dockerized version of Cachet.
https://cachethq.io
BSD 3-Clause "New" or "Revised" License
415 stars 280 forks source link

APP_DEBUG flag typo in documentation #362

Open MarekPikula opened 4 years ago

MarekPikula commented 4 years ago

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

octylFractal commented 4 years ago

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

sxldier commented 4 years ago

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

MarekPikula commented 4 years ago

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

MarekPikula commented 4 years ago

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?

djdefi commented 4 years ago

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.

MarekPikula commented 1 year ago

I guess it can be closed?