fix(dbSer): 更新Redis和MySQL配置及添加代理服务

为Redis添加密码认证并更新MySQL镜像标签和字符集配置
新增webout代理服务配置
This commit is contained in:
cnphpbb
2025-08-15 16:08:32 +08:00
parent eca6eef6ca
commit d31a2982b3
4 changed files with 27 additions and 7 deletions

View File

@@ -1,9 +1,9 @@
# Pull:: docker compose --env-file ./dbSer/mysql/env.cfg -f ./dbSer/mysql/prod.stack.yml pull # Pull:: docker compose --env-file ./dbSer/mysql/env.cfg -f ./dbSer/mysql/prod.stack.yml pull
# Run:: docker compose -p dbSer --env-file ./dbSer/mysql/env.cfg -f ./dbSer/mysql/prod.stack.yml up -d # Run:: docker compose -p mysql --env-file ./dbSer/mysql/env.cfg -f ./dbSer/mysql/prod.stack.yml up -d
services: services:
mysql: mysql:
image: ${IMAGE_TAG_LTS} image: ${IMAGE_TAG_V9}
container_name: prod-mysql container_name: prod-mysql
restart: always restart: always
environment: environment:
@@ -15,8 +15,8 @@ services:
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
ports: ports:
- "3306:3306" - "3306:3306"
command: #command:
#command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --default-authentication-plugin=mysql_native_password command: --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
volumes: volumes:
mysql_data: mysql_data:

View File

@@ -4,3 +4,4 @@ IMAGE_TAG_REDISV8=redis:8.0.3-alpine
IMAGE_TAG_VALKEYV8=valkey/valkey:8.1.3-alpine IMAGE_TAG_VALKEYV8=valkey/valkey:8.1.3-alpine
IMAGE_TAG_VALKEYV7=valkey/valkey:7.2.10-alpine IMAGE_TAG_VALKEYV7=valkey/valkey:7.2.10-alpine
Volumes_PATH=/data/volumes/redis Volumes_PATH=/data/volumes/redis
REDIS_PASSWORD=AGC4eGx2aq8rSiZXBP

View File

@@ -1,11 +1,11 @@
# Pull: docker compose -p valkey --env-file ./base/redis/env.cfg -f ./base/redis/valkey.stack.yml pull # Pull: docker compose -p valkey --env-file ./dbSer/redis/env.cfg -f ./dbSer/redis/valkey.stack.yml pull
# Run:: docker compose -p valkey --env-file ./base/redis/env.cfg -f ./base/redis/valkey.stack.yml up -d # Run:: docker compose -p valkey --env-file ./dbSer/redis/env.cfg -f ./dbSer/redis/valkey.stack.yml up -d
services: services:
redis: redis:
image: ${IMAGE_TAG_VALKEYV8} image: ${IMAGE_TAG_VALKEYV8}
ports: ports:
- '6379:6379' - '6379:6379'
command: valkey-server --appendonly yes command: valkey-server --appendonly yes --requirepass ${REDIS_PASSWORD}
volumes: volumes:
- '${Volumes_PATH}/redis:/data' - '${Volumes_PATH}/redis:/data'

19
webout/myproxy.yml Normal file
View File

@@ -0,0 +1,19 @@
# run:: docker compose -p out-caddy --env-file ./webout/env.cfg -f ./webout/myproxy.yml up -d
services:
web-out:
image: ${IMAGE_TAG}
volumes:
- caddy_data:/data
- caddy_config:/config
- /data/configs/caddy/myproxy.conf:/etc/caddy/Caddyfile
ports:
- '8080:80'
container_name: web-out
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
volumes:
caddy_data:
caddy_config: