Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker image does not recognise timezone appropriately #562

Open
instantdreams opened this issue Apr 16, 2024 · 2 comments
Open

docker image does not recognise timezone appropriately #562

instantdreams opened this issue Apr 16, 2024 · 2 comments

Comments

@instantdreams
Copy link

📝 Describe the bug
Date on host reports according to timezone. Date on cells container reports in UTC. Date on database container reports according to timezone.

⚙️ How-to Reproduce

Steps to reproduce the behavior:

  1. Run pydio cells in container, passing "TZ" environment variable and "localtime" and "timezone" volumes
  2. Run the following commands:
$ docker exec pydio-cells date
Tue Apr 16 14:42:38 America 2024
$ docker exec pydio-cells cat /etc/timezone
America/Edmonton

$ docker exec pydio-db date
Tue Apr 16 08:42:56 MDT 2024
$ docker exec pydio-db cat /etc/timezone
America/Edmonton

🩺 Environment / Setup

Complete the following information:

Server Versions:

  • Pydio Cells Home Edition 4.4.0
  • MySQL 8.3.0-1.el8
  • Server OS: Linux 6.1.0-18-amd64 x86_64
  • Other dependencies Docker version 25.0.4, build 1a576c5
  • Other dependencies Docker Compose version v2.24.7

Client used for testing:

  • Docker compose
  • Terminal window

Additional context:

  • May need to pass tzdata to the alpine base image to enable timezone support
@bsinou
Copy link
Collaborator

bsinou commented Apr 17, 2024

Hi. Could you please precise what image you are using ?
It is not the official image from the Docker's hub: pydio/cells:latest, is it ?

@instantdreams
Copy link
Author

Here's my compose.yaml file:

services:
  pydio:
    image: pydio/cells:latest
    container_name: pydio-cells
    hostname: files
    domainname: example.com
    ports:
      - "8808:8080" # web ui
    environment:
      - TZ=America/Edmonton
      - CELLS_INSTALL_YAML=/pydio/config/install-conf.yml
      - CELLS_BIND=0.0.0.0:8080
      - CELLS_SITE_BIND=0.0.0.0:8080
      - CELLS_EXTERNAL=https://files.example.com
      - CELLS_SITE_EXTERNAL=https://files.example.com
      - CELLS_NO_TLS=1
      - CELLS_LOG=info
      - CELLS_LOG_LEVEL=production
      - CELLS_DEFAULT_DS_STRUCT=true
    volumes:
      - /srv/pydio/config/install-conf.yml:/pydio/config/install-conf.yml:ro
      - /srv/pydio/cells:/var/cells
      - /media/storage/cells/:/var/cells/data
      - /media:/media
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped
  pydio-db:
    image: mysql:latest
    container_name: pydio-db
    hostname: pydio-db
    domainname: example.com
    command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci]
    ports:
      - "3306:3306" # mysql
    environment:
      - TZ=America/Edmonton
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_DATABASE=${MYSQL_DATABASE}
      - MYSQL_USER=${MYSQL_USER}
      - MYSQL_PASSWORD=${MYSQL_PASSWORD}
    volumes:
      - /srv/pydio/mysql:/var/lib/mysql
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    restart: unless-stopped

Here's me trying to pull the latest image to confirm that it is up to date:

$ docker pull pydio/cells:latest
latest: Pulling from pydio/cells
Digest: sha256:5588c806d566ee1d83a1029015aff07fd9720363286127718f495317e1c50f80
Status: Image is up to date for pydio/cells:latest
docker.io/pydio/cells:latest

So yup, pydio/cells:latest is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants