chore: 针对ThinkPHP 6.x 系列,支持自定义.env 文件加载
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user