chore: 针对ThinkPHP 6.x 系列,支持自定义.env 文件加载

This commit is contained in:
2025-11-18 18:35:05 +08:00
parent 4654bca6c3
commit 7ad78f1ee6
17 changed files with 81 additions and 3729 deletions

View File

@@ -20,6 +20,9 @@ services:
- "host.docker.internal:host-gateway" # 支持主机名解析
environment:
PHP_ENV: ${PHP_ENV:-development}
# 环境变量, APP_ENV 应用于 ThinkPHP 6.x 框架, .env.local 要想启用,需要在项目根目录下创建 .env.local 文件,并将 APP_ENV 设置为 local
# 同理,如果要启用开发环境,则将 APP_ENV 设置为 development如果要启用生产环境则将 APP_ENV 设置为 production
# 不然ThinkPHP 6.x 系列,会只加载 .env 文件,而不会加载 .env.local 文件,导致 .env.local 文件中的配置不会生效
APP_ENV: ${APP_ENV:-development}
APP_DEBUG: ${APP_DEBUG:-true}
XDEBUG_CONFIG: ${XDEBUG_CONFIG:-client_host=host.docker.internal client_port=9003}