1. Caddy version (caddy version
):
Caddy v2.0.0-rc.3
2. How I run Caddy:
By using docker-compose, details below.
a. System environment:
Ubuntu 18.04
Docker version 19.03.5
docker-compose version 1.21.2
b. Command:
docker-compose up -d
c. Service/unit/compose file:
version: '3.6'
services:
caddy:
image: caddy
container_name: caddy_reverse_proxy
command: caddy run --watch --config /etc/caddy/Caddyfile
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
ports:
- 80:80
- 443:443
networks:
- caddy
environment:
TZ: Europe/Stockholm
volumes:
caddy_data:
caddy_config:
networks:
caddy:
name: caddy_network
d. My complete Caddyfile or JSON config:
Not relevant.
3. The problem I’m having:
The timezone is not set which makes the log output be two hours off. I want to have it configured, but have no clue about how to do this with the official docker-image provided.
4. Error messages and/or full log output:
N/A
5. What I already tried:
I’ve tried setting TZ=Europe/Stockholm
in the docker-compose which have worked for other docker use cases but it does not seem to work for this one. Reading on Stackoverflow points me to different CLIs which not seem to be available in this image.
I figured this should be a quite common use case? But didn’t find anything when searching through the forum…