Skip to content

Commit

Permalink
Merge branch 'release/2.5.2' into craft-vite
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Mar 27, 2022
2 parents 99b6a79 + 4acb74b commit 61dd922
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# nystudio107/craft Change Log

## 2.5.2 - 2022.03.26
### Added
* Added more logging to indicate when a container is waiting for another service to start up, and when seeding a database is complete
* Run `composer craft-update` after a `composer install` is done via `composer_install.sh`

### Changed
* Moved permissions setting to Docker image creation

## 2.5.1 - 2022.03.26
### Added
* Dramatically sped up the startup time for the PHP containers by moving the permissions setting script to run asynchronously in the queue container via the `run_queue.sh` script
Expand Down
10 changes: 9 additions & 1 deletion docker-config/php-prod-craft/composer_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,13 @@

cd /var/www/project/cms
if [ ! -f "composer.lock" ] || [ ! -d "vendor" ]; then
su-exec www-data composer install --verbose --no-progress --optimize-autoloader --no-interaction
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"
until eval "mysql -h mysql -u $DB_USER -p$DB_PASSWORD $DB_DATABASE -e 'select 1' > /dev/null 2>&1"
do
sleep 1
done
# Run any pending migrations/project config changes
su-exec www-data composer craft-update
fi
4 changes: 2 additions & 2 deletions docker-config/php-prod-craft/run_queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
# @license MIT

cd /var/www/project/cms
# Force the permissions to be set properly
chown -R www-data:www-data /var/www/project &
# Wait until the MySQL db container responds
echo "### Waiting for MySQL database"
until eval "mysql -h mysql -u $DB_USER -p$DB_PASSWORD $DB_DATABASE -e 'select 1' > /dev/null 2>&1"
do
sleep 1
done
# Wait until the `composer install` is done by looking for the `vendor/autoload.php` file
echo "### Waiting for vendor/autoload.php"
while [ ! -f vendor/autoload.php ]
do
sleep 1
Expand Down

0 comments on commit 61dd922

Please sign in to comment.