Problems with timezone

I’ve installed rasa-x using docker compose. My server is at EEST timezone but the containers are running with GMT timezone. I added the following in docker-compose.yml to bring the containers to the correct timezone volumes: - /etc/localtime:/etc/localtime:ro

This worked perfectly for most containers. However rasa-x, rasa-production and rasa-worker didn’t work. I’m getting the following in the container logs:

ValueError: Timezone offset does not match system offset: 0 != 10800. Please, check your config files.

and the containers keep restarting. Which config files in these containers should i change to show the proper timezone?

Found it. I needed to set the environment variable TZ. Now it is working correctly.

How exactly did you do that? I tried with no results.

In the production and worker part of the docker-compose.yml. Example

rasa-production:

<<: *default-rasa-service
environment:
  <<: *rasa-credentials
  RASA_ENVIRONMENT: "production"
  DB_DATABASE: "tracker"
  RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"
  TZ: "Europe/Athens"
volumes:
  - /etc/localtime:/etc/localtime:ro
  - ./logs:/app/logs
ports:
  - "5005:5005"

Thank you!