From 09ee5cfc6675fae63abcd5148b31fbe79bea77fa Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Tue, 16 Dec 2025 14:59:26 +0800 Subject: [PATCH] =?UTF-8?q?docs(haproxy):=20=E6=9B=B4=E6=96=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E6=A1=A3=E5=92=8Cstack.yml=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加HAProxy配置说明文档,并更新stack.yml文件以支持MySQL和Redis代理服务 --- haproxy/readme.md | 3 +++ haproxy/stack.yml | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/haproxy/readme.md b/haproxy/readme.md index 6c419b2..b06914a 100644 --- a/haproxy/readme.md +++ b/haproxy/readme.md @@ -1,3 +1,6 @@ +# HAProxy 配置 + +使用 HAProxy 进行代理 MySQL 和 Redis 服务。 ### 监控 diff --git a/haproxy/stack.yml b/haproxy/stack.yml index 0764e0b..1ee6a96 100644 --- a/haproxy/stack.yml +++ b/haproxy/stack.yml @@ -4,11 +4,17 @@ services: haproxy: image: ${IMAGE_TAG} restart: always + command: + - -f + - /usr/local/etc/haproxy/haproxy.cfg ports: - - "80:80" - - "443:443" + - "${REDIS_PORT}:${REDIS_PORT}" + - "${MYSQL_TEST_PORT}:${MYSQL_TEST_PORT}" + - "${MYSQL_DEV_PORT}:${MYSQL_DEV_PORT}" + - "1936:1936" volumes: - ${Volumes_Path}/haproxy/:/usr/local/etc/haproxy - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro environment: - TZ=Asia/Shanghai \ No newline at end of file