From c0166a757ceee1425db69eb4d3ca6027e2121fd0 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Fri, 15 Apr 2022 17:10:48 -0400 Subject: [PATCH 1/5] refactor: Changed `bootstrap.php` to allow `.env`-set environment variables override existing injected environment variables ([#82](https://github.com/craftcms/craft/issues/82)) --- cms/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/bootstrap.php b/cms/bootstrap.php index 2502887..d57d6da 100644 --- a/cms/bootstrap.php +++ b/cms/bootstrap.php @@ -12,7 +12,7 @@ // Load dotenv? if (class_exists('Dotenv\Dotenv')) { - Dotenv\Dotenv::createUnsafeImmutable(CRAFT_BASE_PATH)->safeLoad(); + Dotenv\Dotenv::createUnsafeMutable(CRAFT_BASE_PATH)->safeLoad(); } // Define additional PHP constants From 6d641ee8da077e64cd3537ba6b994ba85a329433 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Fri, 15 Apr 2022 17:10:54 -0400 Subject: [PATCH 2/5] chore: Version 2.5.9 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 264f1c2..9938f8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # nystudio107/craft Change Log +## 2.5.9 - UNRELEASED +### Changed +* Changed `bootstrap.php` to allow `.env`-set environment variables override existing injected environment variables ([#82](https://github.com/craftcms/craft/issues/82)) + ## 2.5.8 - 2022.04.13 ### Fixed * Changed the hostname from `mysql` to `mariadb` in the `composer_install.sh` and `run_queue.sh` scripts, since we're using MariaDB From 2f0cfb50f486fb13411dd2eed20e7ebd62036d18 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Mon, 2 May 2022 13:12:39 -0400 Subject: [PATCH 3/5] fix: Clean up initial check for `composer.lock` or `vendor/autoload.php` to ensure the first-time install is done --- docker-config/php-prod-craft/composer_install.sh | 4 ++-- docker-config/php-prod-craft/run_queue.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-config/php-prod-craft/composer_install.sh b/docker-config/php-prod-craft/composer_install.sh index 0d6045c..2ebfa1f 100755 --- a/docker-config/php-prod-craft/composer_install.sh +++ b/docker-config/php-prod-craft/composer_install.sh @@ -13,9 +13,9 @@ # Ensure permissions on directories Craft needs to write to chown -R www-data:www-data /var/www/project/cms/storage chown -R www-data:www-data /var/www/project/cms/web/cpresources -# Check for `composer.lock` & `vendor/` +# Check for `composer.lock` & `vendor/autoload.php` cd /var/www/project/cms -if [ ! -f "composer.lock" ] || [ ! -d "vendor" ]; then +if [ ! -f "composer.lock" ] || [ ! -f "vendor/autoload.php" ]; then su-exec www-data composer install --verbose --no-progress --no-scripts --optimize-autoloader --no-interaction # Wait until the MySQL db container responds echo "### Waiting for MySQL database" diff --git a/docker-config/php-prod-craft/run_queue.sh b/docker-config/php-prod-craft/run_queue.sh index 57eebf3..5318cdd 100755 --- a/docker-config/php-prod-craft/run_queue.sh +++ b/docker-config/php-prod-craft/run_queue.sh @@ -19,9 +19,9 @@ until eval "mysql -h mariadb -u $DB_USER -p$DB_PASSWORD $DB_DATABASE -e 'select do sleep 1 done -# Wait until the `composer install` is done by looking for the `vendor/autoload.php` file +# Wait until the `composer install` is done by looking for the `vendor/autoload.php` and `composer.lock` files echo "### Waiting for vendor/autoload.php" -while [ ! -f vendor/autoload.php ] || [ ! -f composer.lock ] +while [ ! -f "vendor/autoload.php" ] || [ ! -f "composer.lock" ] do sleep 1 done From f5d7c6fe6b38a81aafbd97d660e1f3401be0ca1b Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Mon, 2 May 2022 13:12:46 -0400 Subject: [PATCH 4/5] chore: Version 2.5.9 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9938f8a..7215130 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # nystudio107/craft Change Log ## 2.5.9 - UNRELEASED +### Fixed +* Clean up initial check for `composer.lock` or `vendor/autoload.php` to ensure the first-time install is done + ### Changed * Changed `bootstrap.php` to allow `.env`-set environment variables override existing injected environment variables ([#82](https://github.com/craftcms/craft/issues/82)) From 7e7928b6c2e60692cd4c4eb49059ec58a188dd8f Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Mon, 2 May 2022 13:40:06 -0400 Subject: [PATCH 5/5] chore: Version 2.5.9 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7215130..6e99a01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # nystudio107/craft Change Log -## 2.5.9 - UNRELEASED +## 2.5.9 - 2022.05.02 ### Fixed * Clean up initial check for `composer.lock` or `vendor/autoload.php` to ensure the first-time install is done