chore(docker): 去除xdebug依赖,优化.env 环境变量
This commit is contained in:
@@ -27,23 +27,18 @@ services:
|
||||
# 不然,ThinkPHP 6.x 系列,会只加载 .env 文件,而不会加载 .env.local 文件,导致 .env.local 文件中的配置不会生效
|
||||
APP_ENV: ${APP_ENV:-local}
|
||||
APP_DEBUG: ${APP_DEBUG:-true}
|
||||
XDEBUG_CONFIG: ${XDEBUG_CONFIG:-client_host=host.docker.internal client_port=9003}
|
||||
PHP_IDE_CONFIG: serverName=docker-php
|
||||
ports:
|
||||
- "${PHP_FPM_PORT:-9000}:9000" # PHP-FPM
|
||||
- "${XDEBUG_POST:-9003}:9003" # Xdebug
|
||||
- "${PHP_FPM_PORT:-9000}:9000" # PHP-FPM
|
||||
volumes:
|
||||
- ./:/var/www/all_source
|
||||
- ./src:/var/www/html
|
||||
# 更新下载源列表以加速apt-get
|
||||
- ./docker/debian/sources.list:/etc/apt/sources.list:ro
|
||||
- ./docker/php/php.ini:/usr/local/etc/php/php.ini:ro
|
||||
- ./docker/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
|
||||
- xdebug_logs:/tmp # Xdebug 日志目录
|
||||
depends_on:
|
||||
- db
|
||||
healthcheck:
|
||||
test: ["CMD", "bash", "-c", "curl -f http://localhost:9000/status && ps aux | grep '[p]hp think cron:schedule'"]
|
||||
test: ["CMD", "bash", "-c", "curl -f http://localhost:9000/status"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
@@ -119,7 +114,6 @@ services:
|
||||
volumes:
|
||||
mysql_db_data:
|
||||
redis_data:
|
||||
xdebug_logs:
|
||||
|
||||
networks:
|
||||
sass-platform-net:
|
||||
|
||||
Reference in New Issue
Block a user