From d860760bfc3723ed92b143b7c1c622158fac9f34 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Sun, 26 Jan 2025 04:02:30 +0800 Subject: [PATCH] up(dbSer): mysql && postgres --- dbSer/mysql/env.cfg | 6 +++++- dbSer/mysql/prod.stack.yml | 11 ++++++----- dbSer/postgres/env.cfg | 3 ++- dbSer/postgres/prod.stack.yml | 5 +++-- dbSer/postgres/test.stack.yml | 1 + 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/dbSer/mysql/env.cfg b/dbSer/mysql/env.cfg index 2941006..d04d518 100644 --- a/dbSer/mysql/env.cfg +++ b/dbSer/mysql/env.cfg @@ -1 +1,5 @@ -IMAGE_TAG=mysql:8.3.0 \ No newline at end of file +IMAGE_TAG=mysql:8.4.4 +IMAGE_TAG_V9=mysql:9.2.0 +IMAGE_TAG_V8=mysql:8.0.41 +IMAGE_TAG_LTS=mysql:8.4.4 +MYSQL_ROOT_PASSWORD=Kevin%0412%Mysql \ No newline at end of file diff --git a/dbSer/mysql/prod.stack.yml b/dbSer/mysql/prod.stack.yml index dcab5d8..5b3ab28 100644 --- a/dbSer/mysql/prod.stack.yml +++ b/dbSer/mysql/prod.stack.yml @@ -3,19 +3,20 @@ services: mysql: - image: mysql:8.3.0 + image: ${IMAGE_TAG_LTS} container_name: prod-mysql restart: always environment: - - MYSQL_ROOT_PASSWORD=Kevin%0412%Mysql + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} - TZ=Asia/Shanghai volumes: - mysql_data:/var/lib/mysql - - mysql_logs:/var/log/mysql + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro ports: - "3306:3306" - command: --default-authentication-plugin=mysql_native_password + command: + #command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --default-authentication-plugin=mysql_native_password volumes: mysql_data: - mysql_logs: diff --git a/dbSer/postgres/env.cfg b/dbSer/postgres/env.cfg index 6abdd59..ef18d4c 100644 --- a/dbSer/postgres/env.cfg +++ b/dbSer/postgres/env.cfg @@ -1,5 +1,6 @@ #IMAGE_TAG=postgres:14.11-bookworm #IMAGE_TAG=postgres:15.6-bookworm -IMAGE_TAG=postgres:16.2-bookworm +IMAGE_TAG=postgres:16.6 +IMAGE_TAG_V17=postgres:17.2 POSTGRES_PASSWORD=Kevin0412PgSql POSTGRES_HOST_AUTH_METHOD=scram-sha-256 \ No newline at end of file diff --git a/dbSer/postgres/prod.stack.yml b/dbSer/postgres/prod.stack.yml index 123571b..f4b2b35 100644 --- a/dbSer/postgres/prod.stack.yml +++ b/dbSer/postgres/prod.stack.yml @@ -7,14 +7,15 @@ services: image: ${IMAGE_TAG} container_name: prod-postgre restart: always + shm_size: 256mb environment: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD} - POSTGRES_INITDB_ARGS=--auth-host=${POSTGRES_HOST_AUTH_METHOD} - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - TZ=Asia/Shanghai volumes: - /data/volumes/postgres/data:/var/lib/postgresql/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro ports: - "5432:5432" \ No newline at end of file diff --git a/dbSer/postgres/test.stack.yml b/dbSer/postgres/test.stack.yml index a11f395..1cf5a6b 100644 --- a/dbSer/postgres/test.stack.yml +++ b/dbSer/postgres/test.stack.yml @@ -7,6 +7,7 @@ services: image: ${IMAGE_TAG} container_name: prod-postgre restart: always + shm_size: 128mb environment: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD}