Define timezone for containers

Introduction

You can add a timezone reference to the container by including the argument -Duser.timezone=Continent/City in the entrypoint within the stack file.

This configuration is available by default for every cluster installation, but it can also be added to single server instances by copying it from the cluster stack YAML.

For more details, please refer to the Deploy Cluster Stack documentation.

Timezone list

To find the correct timezone, such as "Europe/Berlin," please consult this timezone list: https://timezonedb.com/time-zones

Example fx

  fx:
     image: repo.moovit24.de:443/mcp_fx:4.8.0
     restart: always
     entrypoint: /bin/sh -c '/wait-for.sh users:8000 && /wait-for.sh preferences:8002 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'
     deploy:
       mode: global
       resources:
        limits:
         memory: 1500M

Applicable Containers

The timezone reference can be added to the following containers within the stack editor:

  • fx

  • io

  • co

  • hk

  • users

  • streams

  • preferences

  • metadata

  • logging

  • amqp

  • license

  • language

  • cronjob

Entrypoints for dedicated containers

services:

  fx:
     entrypoint: /bin/sh -c '/wait-for.sh users:8000 && /wait-for.sh preferences:8002 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'
       
  io:
     entrypoint: /bin/sh -c '/wait-for.sh users:8000 && /wait-for.sh preferences:8002 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  co:
     entrypoint: /bin/sh -c '/wait-for.sh users:8000 && /wait-for.sh preferences:8002 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'
  
  hk:
     entrypoint: /bin/sh -c '/wait-for.sh users:8000 && /wait-for.sh preferences:8002 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  users:
     entrypoint: /bin/sh -c 'java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  streams:
     entrypoint: /bin/sh -c '/wait-for.sh users:8000 && /wait-for.sh preferences:8002 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  preferences:
    entrypoint: /bin/sh -c '/wait-for.sh users:8000 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  metadata:
    entrypoint: /bin/sh -c '/wait-for.sh users:8000 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'
      
  logging:
    entrypoint: /bin/sh -c 'java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  amqp:
    entrypoint: /bin/sh -c '/wait-for.sh rabbitmq:5672 && java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  license:
    entrypoint: /bin/sh -c 'java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  language:
    entrypoint: /bin/sh -c 'java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

  cronjob:
    entrypoint: /bin/sh -c 'java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'
    
  hc:
    entrypoint: /bin/sh -c 'java -XX:+UseSerialGC -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Berlin -jar /app/app.jar $${parameters}'

Last updated