jarischaefer / docker-librenms

Docker image for LibreNMS
MIT License
115 stars 37 forks source link

how to change timezone ? #105

Closed changchichung closed 5 years ago

changchichung commented 5 years ago

I try add TZ and mount host /etc/localtime in docker-compose.yml but it does not work.

services:
  web:
    image: jarischaefer/docker-librenms
    hostname: librenms
    ports:
      - "8001:80"
      - "44301:443"
    volumes:
      - ./logs:/opt/librenms/logs
      - ./rrd:/opt/librenms/rrd
      - /etc/hosts:/etc/hosts
      - /etc/localtime:/etc/localtime:ro
#      - /etc/timezone:/etc/timezone:ro this will cause container not working
    environment:
      - APP_KEY=
      - DB_HOST=db
      - DB_NAME=librenms
      - DB_USER=
      - DB_PASS=
      - POLLERS=16
      - BASE_URL=http://bbs013.abc.com:8001
      - TZ="Asia/Taipei"
    links:
      - mysql:db

But I can confirm that /etc/timezone has already been changed to Asia/Taipei , any ideas ?

jarischaefer commented 5 years ago

TZ=Asia/Taipei should be sufficient. What issue are you facing exactly?

changchichung commented 5 years ago

TZ=Asia/Taipei is OK , but TZ="Asia/Taipei" is not good configuration .. the datetime is correct now , thanks !