serversideup / docker-php

🐳 Production-ready Docker images for PHP. Optimized for Laravel, WordPress, and more!
https://serversideup.net/open-source/docker-php/
GNU General Public License v3.0
1.67k stars 109 forks source link

Create a method to silence the initialization banner only #317

Closed joshmanders closed 4 months ago

joshmanders commented 4 months ago

Affected Docker Images

All of them.

Docker Labels of the affected images

No response

Current Behavior

When I start up my application I am met with this banner.

--------------------------------------------------------------------
 ____                             ____  _     _        _   _
/ ___|  ___ _ ____   _____ _ __  / ___|(_) __| | ___  | | | |_ __
\___ \ / _ \  __\ \ / / _ \  __| \___ \| |/ _` |/ _ \ | | | |  _ \
 ___) |  __/ |   \ V /  __/ |     ___) | | (_| |  __/ | |_| | |_) |
|____/ \___|_|    \_/ \___|_|    |____/|_|\__,_|\___|  \___/| .__/
                                                            |_|

Brought to you by serversideup.net
--------------------------------------------------------------------

🙌 To support Server Side Up projects visit:
https://serversideup.net/sponsor

-------------------------------------
ℹ️ Container Information
-------------------------------------

Docker user:   root
Docker uid:    0
Docker gid:    0
OPcache:       ✅ Enabled

Which is fine for default, but I should be able to silence it to reduce noise in my systems. Docs and repository code shows that I must set LOG_OUTPUT_LEVEL to off to silence this. But the docs also state this env var is used to set levels for other things such as nginx/apache/etc.

Expected Behavior

I should be able to silence the unnecessary logging without silencing the logging I want.

Steps To Reproduce

  1. Use these images as intended

Host Operating System

macOS/Linux

Docker Version

Docker version 25.0.3, build 4debf41

Anything else?

No response

jaydrogers commented 4 months ago

Good point! I'll create a special env called SILENCE_INIT_BANNER that will affect the first initialization banner only

jaydrogers commented 4 months ago

Just added a variable called SHOW_WELCOME_MESSAGE and defaulted it to true.

You can easily set this to false if you want that message to go away.

Tracking the deployment

I appreciate you contributing this idea!