chore(docker): 生产环境 MySQL 配置注释,便于后续外连时启用端口
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
# 生产环境不暴露 MySQL 端口,仅容器内部访问
|
# 仅绑定 127.0.0.1,供本机连接(SSH 登入后 mysql -h 127.0.0.1 -P 3399)
|
||||||
ports: []
|
# 不暴露到公网;若无需外连可改为 ports: []
|
||||||
# 使用宿主机目录存储数据,便于备份
|
# 使用宿主机目录存储数据,便于备份
|
||||||
volumes:
|
volumes:
|
||||||
- /opt/vitals/mysql_data:/var/lib/mysql
|
- /opt/vitals/mysql_data:/var/lib/mysql
|
||||||
|
|||||||
Reference in New Issue
Block a user