Skip to content

Commit fd0a201

Browse files
committed
update .env.example DB_USERNAME
1 parent eb3c03c commit fd0a201

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.docker/php/entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ if [ "$SERVICE_NAME" = "php" ]; then
6767
cp -r "$SOURCE_DIR" "$TARGET_DIR"
6868
sed -i 's|LOG_FILE.*|LOG_FILE=php://stdout|g' "$ROOT_PATH/.env.example"
6969
if [ -f "$ENV_FILE" ]; then
70+
echo_info "update LOG_FILE + DB_HOST + REDIS_HOST ..."
7071
sed -i 's|LOG_FILE.*|LOG_FILE=php://stdout|g' "$ENV_FILE"
72+
sed -i 's|DB_HOST.*|DB_HOST=mysql|g' "$ENV_FILE"
73+
sed -i 's|REDIS_HOST.*|REDIS_HOST=redis|g' "$ENV_FILE"
7174
fi
7275
else
7376
echo_success ".env file: $ENV_FILE and vendor autoload file: $VENDOR_AUTOLOAD_FILE already exists, skip copy install file ..."

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ DB_CONNECTION=mysql
1111
DB_HOST=127.0.0.1
1212
DB_PORT=3306
1313
DB_DATABASE=nexusphp
14-
DB_USERNAME=root
15-
DB_PASSWORD=
14+
DB_USERNAME=nexusphp
15+
DB_PASSWORD=nexusphp
1616

1717
BROADCAST_DRIVER=log
1818
CACHE_DRIVER=redis

0 commit comments

Comments
 (0)