diff --git a/CHANGELOG.md b/CHANGELOG.md index e0f82bc..f3160c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # nystudio107/craft Change Log +## 2.5.7 - 2022.04.08 +### Changed +* Run migrations first via `composer.json` scripts, because Craft won't apply Project Config if there are pending migrations +* Added `tty: true` back in now that the issue has been fixed in the Docker Compose API `2.4.1` ([#9348](https://github.com/docker/compose/pull/9348)) +* Wait for both `vendor/autoload.php` as we as `composer.lock` before starting up the queue listener + ## 2.5.6 - 2022.03.30 ### Changed * Fix `WORKDIR` in `php-prod-craft` container so `make craft` etc. commands work as expected diff --git a/cms/composer.json b/cms/composer.json index 7b66be5..528bb28 100644 --- a/cms/composer.json +++ b/cms/composer.json @@ -40,8 +40,8 @@ "post-craft-update": [ "Composer\\Config::disableProcessTimeout", "@php craft install/check && php craft clear-caches/all --interactive=0 || exit 0", - "@php craft install/check && php craft project-config/apply --interactive=0 || exit 0", - "@php craft install/check && php craft migrate/all --interactive=0 || exit 0" + "@php craft install/check && php craft migrate/all --interactive=0 || exit 0", + "@php craft install/check && php craft project-config/apply --interactive=0 || exit 0" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" diff --git a/docker-compose.yml b/docker-compose.yml index 4771fe7..2e9cfe8 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,6 +27,7 @@ services: expose: - "9000" init: true + tty: true volumes: &php-volumes - cpresources:/var/www/project/cms/web/cpresources:delegated - storage:/var/www/project/cms/storage:delegated @@ -48,6 +49,7 @@ services: expose: - "9000" init: true + tty: true volumes: *php-volumes # queue - runs queue jobs via php craft queue/listen @@ -60,6 +62,7 @@ services: env_file: *env init: true + tty: true volumes: *php-volumes # mariadb - database @@ -98,6 +101,7 @@ services: init: true ports: - "3000:3000" + tty: true volumes: - ./buildchain:/var/www/project/buildchain:cached - ./buildchain/node_modules:/var/www/project/buildchain/node_modules:delegated diff --git a/docker-config/php-prod-craft/run_queue.sh b/docker-config/php-prod-craft/run_queue.sh index 5f7adc3..e75ddae 100755 --- a/docker-config/php-prod-craft/run_queue.sh +++ b/docker-config/php-prod-craft/run_queue.sh @@ -21,7 +21,7 @@ do 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 ] +while [ ! -f vendor/autoload.php ] || [ ! -f composer.lock ] do sleep 1 done