Skip to content

Commit

Permalink
Fix race condition on building
Browse files Browse the repository at this point in the history
  • Loading branch information
DonRichards committed Oct 18, 2023
1 parent c8024f7 commit 1131304
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions custom.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,13 @@ jhu_up: jhu_generate-secrets
docker-compose up -d --remove-orphans
docker-compose exec -T drupal with-contenv bash -lc 'git config --global --add safe.directory /var/www/drupal/web/modules/contrib/islandora_fits'
# The rest of this should be moved into another function.
docker-compose exec -T drupal with-contenv bash -lc 'rm -rf vendor/ web/modules/contrib/* web/themes/contrib/* ; composer install'
@echo "Wait for the /var/www/drupal directory to be available"
while ! docker compose exec -T drupal with-contenv bash -lc 'test -d /var/www/drupal'; do \
echo "Waiting for /var/www/drupal directory to be available..."; \
sleep 2; \
done
docker-compose exec -T drupal with-contenv bash -lc 'rm -rf vendor/ web/modules/contrib/* web/themes/contrib/*'
docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx /var/www/drupal/ && su nginx -s /bin/bash -c "composer install"'
$(MAKE) set-codebase-owner
docker-compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx .'
$(MAKE) drupal-database update-settings-php
Expand Down Expand Up @@ -236,7 +242,12 @@ jhu_config_export:
## JHU: Imports the sites configuration.
jhu_config_import:
$(MAKE) set-codebase-owner
docker-compose exec drupal with-contenv bash -lc "composer install"
@echo "Wait for the /var/www/drupal directory to be available"
while ! docker compose exec -T drupal with-contenv bash -lc 'test -d /var/www/drupal'; do \
echo "Waiting for /var/www/drupal directory to be available..."; \
sleep 2; \
done
docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx /var/www/drupal/ && su nginx -s /bin/bash -c "composer install"'
docker-compose exec drupal with-contenv bash -lc "chown -R nginx: /var/www/drupal/config/sync/"
docker-compose exec -T drupal drush -l $(SITE) config:import -y --debug
$(MAKE) set-codebase-owner
Expand Down

0 comments on commit 1131304

Please sign in to comment.