From 9199049180d85450d7bd1fb98cc295ce620d7c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=B6=E5=90=8D?= <13774486042@163.com> Date: Tue, 27 Dec 2022 14:41:34 +0800 Subject: [PATCH] [Improvement][docker] Add SPRING_JACKSON_TIME_ZONE to .env file (#13271) * tz in docker * update default tz and update doc Co-authored-by: chenjiaming --- deploy/docker/.env | 1 + docs/docs/en/guide/start/docker.md | 5 +++++ docs/docs/zh/guide/start/docker.md | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/deploy/docker/.env b/deploy/docker/.env index 7c2e427763..ad703258aa 100755 --- a/deploy/docker/.env +++ b/deploy/docker/.env @@ -20,5 +20,6 @@ TAG=latest TZ=Asia/Shanghai DATABASE=postgresql +SPRING_JACKSON_TIME_ZONE=UTC SPRING_DATASOURCE_URL=jdbc:postgresql://dolphinscheduler-postgresql:5432/dolphinscheduler REGISTRY_ZOOKEEPER_CONNECT_STRING=dolphinscheduler-zookeeper:2181 diff --git a/docs/docs/en/guide/start/docker.md b/docs/docs/en/guide/start/docker.md index 2c8b7c95d5..db58a19c82 100644 --- a/docs/docs/en/guide/start/docker.md +++ b/docs/docs/en/guide/start/docker.md @@ -79,6 +79,7 @@ $ docker run -d --name dolphinscheduler-tools \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ --net host \ apache/dolphinscheduler-tools:"${DOLPHINSCHEDULER_VERSION}" tools/bin/upgrade-schema.sh # Starting DolphinScheduler service @@ -87,6 +88,7 @@ $ docker run -d --name dolphinscheduler-master \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ -e REGISTRY_ZOOKEEPER_CONNECT_STRING="localhost:2181" \ --net host \ -d apache/dolphinscheduler-master:"${DOLPHINSCHEDULER_VERSION}" @@ -95,6 +97,7 @@ $ docker run -d --name dolphinscheduler-worker \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ -e REGISTRY_ZOOKEEPER_CONNECT_STRING="localhost:2181" \ --net host \ -d apache/dolphinscheduler-worker:"${DOLPHINSCHEDULER_VERSION}" @@ -103,6 +106,7 @@ $ docker run -d --name dolphinscheduler-api \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ -e REGISTRY_ZOOKEEPER_CONNECT_STRING="localhost:2181" \ --net host \ -d apache/dolphinscheduler-api:"${DOLPHINSCHEDULER_VERSION}" @@ -111,6 +115,7 @@ $ docker run -d --name dolphinscheduler-alert-server \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ -e REGISTRY_ZOOKEEPER_CONNECT_STRING="localhost:2181" \ --net host \ -d apache/dolphinscheduler-alert-server:"${DOLPHINSCHEDULER_VERSION}" diff --git a/docs/docs/zh/guide/start/docker.md b/docs/docs/zh/guide/start/docker.md index 72284bc80f..2f6107e28f 100644 --- a/docs/docs/zh/guide/start/docker.md +++ b/docs/docs/zh/guide/start/docker.md @@ -72,6 +72,7 @@ $ docker run -d --name dolphinscheduler-tools \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ --net host \ apache/dolphinscheduler-tools:"${DOLPHINSCHEDULER_VERSION}" tools/bin/upgrade-schema.sh # 启动 DolphinScheduler 对应的服务 @@ -80,6 +81,7 @@ $ docker run -d --name dolphinscheduler-master \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ -e REGISTRY_ZOOKEEPER_CONNECT_STRING="localhost:2181" \ --net host \ -d apache/dolphinscheduler-master:"${DOLPHINSCHEDULER_VERSION}" @@ -88,6 +90,7 @@ $ docker run -d --name dolphinscheduler-worker \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ -e REGISTRY_ZOOKEEPER_CONNECT_STRING="localhost:2181" \ --net host \ -d apache/dolphinscheduler-worker:"${DOLPHINSCHEDULER_VERSION}" @@ -96,6 +99,7 @@ $ docker run -d --name dolphinscheduler-api \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ -e REGISTRY_ZOOKEEPER_CONNECT_STRING="localhost:2181" \ --net host \ -d apache/dolphinscheduler-api:"${DOLPHINSCHEDULER_VERSION}" @@ -104,6 +108,7 @@ $ docker run -d --name dolphinscheduler-alert-server \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://localhost:5432/dolphinscheduler" \ -e SPRING_DATASOURCE_USERNAME="" \ -e SPRING_DATASOURCE_PASSWORD="" \ + -e SPRING_JACKSON_TIME_ZONE="UTC" \ -e REGISTRY_ZOOKEEPER_CONNECT_STRING="localhost:2181" \ --net host \ -d apache/dolphinscheduler-alert-server:"${DOLPHINSCHEDULER_VERSION}"