Improvement of Timezone Handling and Caddy Log Formatting#624
Improvement of Timezone Handling and Caddy Log Formatting#624K2ouMais wants to merge 12 commits intoserversideup:release/bugfixes-and-dependency-updatesfrom
Conversation
|
Please take a look at the following file: There is on line one the word "debug". I just let it the way it was and didnt find any reference in the caddy logs for that. |
|
Whoops, I should have commented here 😃
|
|
@jaydrogers I made a mistake on this one. I declared TZ to be available on all images, but that is not true 🤦♂️ You can use TZ only on debian based images. On alpine images, tzdata would have to be installed. Let me know, how should I progress on this one. |
|
I reverted recent changes to Dockerfiles that attempted to set the timezone via the Reason for RevertThe Impact & New StandardAlpine Images:
Debian Images:
New Feature for Log ClarityTo improve log readability, especially for users remaining on
|
|
How much space gets added to Alpine if we include tzdata by default? |
|
To be honest I didnt try, because you said you didnt want any packages installed, that would possibly make the images bigger, wich is understandable. |
|
No problem. I can take a look if needed. I appreciate your efforts on this 👍 |
|
Please also take a look at this file: On the first line there is the word debug wich isnt in any other files and I couldnt find anything on the caddy documentation about it. It might be a typo. |
|
I finally had some more time to review this. Here's some thoughts: TZ variable requires
|
|
Oh I almost forgot this PR I made 😂 It has been a long time... I’d advise against removing the ability to set the timezone within PHP itself. In many organizations, development teams (who manage PHP settings) and platform/SRE teams (who manage container environments) are separate; they may need to control timezones at different levels. Having worked in both roles, I’ve seen the need for this flexibility firsthand. Before I transition over to FrankenPHP, I’d really like to see this merged. Beyond the timezone fix, this PR also improves log readability and reduces unnecessary noise. |
Description:
It has been possible to set container timezones via the
TZenvironment variable without installingtzdata. To improve visibility and usability, I have explicitly added thisENVvariable to all Dockerfiles and updated the documentation.FrankenPHP & Caddy Logging:
Currently, the FrankenPHP images (using Caddy) output logs in UTC by default, which can complicate debugging. I have adjusted the Caddy configuration to:
TZvariable in log outputs.CADDY_LOG_DATETIME_FORMAT, allowing for custom timestamp formats supported by Caddy.Backward Compatibility:
These changes are fully backward compatible. Default values are in place, ensuring that if
TZorCADDY_LOG_DATETIME_FORMATare not set, the behavior remains exactly as it is now.Examples
docker-compose.yml
Running directly in your terminal: