Skip to content

Conversation

@K2ouMais
Copy link

@K2ouMais K2ouMais commented Nov 27, 2025

Description:

It has been possible to set container timezones via the TZ environment variable without installing tzdata. To improve visibility and usability, I have explicitly added this ENV variable 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:

  1. Respect the timezone set via the TZ variable in log outputs.
  2. Introduce a new variable, 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 TZ or CADDY_LOG_DATETIME_FORMAT are not set, the behavior remains exactly as it is now.

Examples

docker-compose.yml

services:
  app:
    image: serversideup/php:8.5-frankenphp
    environment:
      TZ: Europe/Berlin
      CADDY_LOG_DATETIME_FORMAT: "wall"
...

Running directly in your terminal:

docker run --rm -it \
  -e TZ=Europe/Berlin \
  -e CADDY_LOG_DATETIME_FORMAT=wall \
  serversideup/php:8.5-frankenphp

@K2ouMais
Copy link
Author

K2ouMais commented Nov 28, 2025

Please take a look at the following file:

https://github.com/serversideup/docker-php/blob/main/src/variations/frankenphp/etc/frankenphp/log-level/global/debug.caddyfile

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.
It could be a possible bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant