2
0

feat: docker timezone follow host timezone

This commit is contained in:
zhangsz
2025-02-14 00:18:57 +11:00
parent 8955563f37
commit 40f63ffe22
4 changed files with 32 additions and 5 deletions

View File

@@ -4,6 +4,9 @@ services:
container_name: ${MYSQL_SERVICE_NAME}
build:
context: ./mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=${TZ}
ports:
- "${MYSQL_SERVICE_PORT}:${MYSQL_SERVICE_PORT}"
networks:
@@ -14,8 +17,6 @@ services:
- ./mysql/logs:/opt/wfc/mysql/logs
- ./mysql/data:/var/lib/mysql
- ./mysql/tmp:/tmp
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -u root -p'${MYSQL_ROOT_PASSWORD}'"]
interval: 10s
@@ -28,6 +29,8 @@ services:
container_name: wfc-redis
build:
context: ./redis
environment:
- TZ=${TZ}
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
networks:
@@ -62,6 +65,7 @@ services:
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/home/nacos/conf/
- TZ=${TZ}
volumes:
- ./nacos/logs/:/home/nacos/logs
- ./nacos/conf/application.properties:/home/nacos/conf/application.properties
@@ -108,6 +112,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${GATEWAY_SERVER_PORT}/actuator/health || exit 1"]
interval: 30s
@@ -144,6 +149,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- AUTH_SERVER_PORT=${AUTH_SERVER_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${AUTH_SERVER_PORT}/actuator/health || exit 1"]
interval: 30s
@@ -180,6 +186,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- WFC_SYSTEM_PORT=${WFC_SYSTEM_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_SYSTEM_PORT}/actuator/health || exit 1"]
interval: 30s
@@ -216,6 +223,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- WFC_USER_PORT=${WFC_USER_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_USER_PORT}/actuator/health || exit 1"]
interval: 30s
@@ -250,6 +258,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- WFC_FILE_PORT=${WFC_FILE_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
restart: ${RESTART_OPTION}
wfc-modules-job:
@@ -279,6 +288,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- WFC_JOB_PORT=${WFC_JOB_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
restart: ${RESTART_OPTION}
wfc-modules-payment:
@@ -311,6 +321,7 @@ services:
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
- WFC_PAYMENT_PORT=${WFC_PAYMENT_PORT}
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
- TZ=${TZ}
restart: ${RESTART_OPTION}
wfc-nginx:
@@ -338,6 +349,7 @@ services:
- GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT}
- WFC_SERVER_IP=${WFC_SERVER_IP}
- WFC_SERVER_PORT=${WFC_SERVER_PORT}
- TZ=${TZ}
restart: ${RESTART_OPTION}
networks: