From fd0a2014ba454b61cad11ef74364f4a06afddf17 Mon Sep 17 00:00:00 2001 From: xiaomlove <1939737565@qq.com> Date: Sat, 31 Jan 2026 12:34:44 +0700 Subject: [PATCH] update .env.example DB_USERNAME --- .docker/php/entrypoint.sh | 3 +++ .env.example | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.docker/php/entrypoint.sh b/.docker/php/entrypoint.sh index 3126b694..ccde8aa8 100644 --- a/.docker/php/entrypoint.sh +++ b/.docker/php/entrypoint.sh @@ -67,7 +67,10 @@ if [ "$SERVICE_NAME" = "php" ]; then cp -r "$SOURCE_DIR" "$TARGET_DIR" sed -i 's|LOG_FILE.*|LOG_FILE=php://stdout|g' "$ROOT_PATH/.env.example" if [ -f "$ENV_FILE" ]; then + echo_info "update LOG_FILE + DB_HOST + REDIS_HOST ..." sed -i 's|LOG_FILE.*|LOG_FILE=php://stdout|g' "$ENV_FILE" + sed -i 's|DB_HOST.*|DB_HOST=mysql|g' "$ENV_FILE" + sed -i 's|REDIS_HOST.*|REDIS_HOST=redis|g' "$ENV_FILE" fi else echo_success ".env file: $ENV_FILE and vendor autoload file: $VENDOR_AUTOLOAD_FILE already exists, skip copy install file ..." diff --git a/.env.example b/.env.example index c2931d87..f15fe88d 100644 --- a/.env.example +++ b/.env.example @@ -11,8 +11,8 @@ DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=nexusphp -DB_USERNAME=root -DB_PASSWORD= +DB_USERNAME=nexusphp +DB_PASSWORD=nexusphp BROADCAST_DRIVER=log CACHE_DRIVER=redis