Open asgeo1 opened 1 year ago
This works for me:
version: "3.9"
services:
ofelia:
image: mcuadros/ofelia:latest
container_name: app-cron
command: daemon --docker
network_mode: none
environment:
TZ: Europe/Rome
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
@Trane9991 this can be closed.
Thanks @webysther, but I don't understand, where are you putting that docker configuration?
It looks like you're running your own Ofelia container outside of Easy Engine.
The question is how do I do that within the context of Easy Engine, given it is a wrapper around Docker, and has it's own ee cron
commands, and it's own custom version of the Ofelia docker image that it runs.
The documentation here suggests you can create a custom /opt/easyengine/services/docker-compose-custom.yml
for customising global services.
I've tried creating that file and populating with this configuration
version: '3.5'
services:
global-cron:
environment:
- TZ=Melbourne/Australia
And then refreshing the containers with ee service refresh
But when I connect to the running cron
container with docker exec -it cbdc0838924f /bin/sh
and run date
, it still has the date in UTC, so not sure that it's working.
Sorry, wrong repository! Ignore my comment.
I can't see any way to set the timezone that the cron/ofelia container is using.
For other containers, i.e.
php
, I can set this indocker-compose-custom.yml
, i.e.There should be some way to do this for the cron/ofelia container, since this Ofelia ticket suggests that it does respect
TZ
environment variable if set.My server is in
Australia/Melbourne
, as are most of the containers - except foree-cron-scheduler
which appears to still be inUTC+0
, which is lame as I'd like everything to be using the same timezone.Hope there is a way!