Skip to content

Commit

Permalink
Merge pull request #366 from Islandora-Devops/chown_errors_10_26
Browse files Browse the repository at this point in the history
Make the chown nginx to tolerate when a file is set to archive/read.
  • Loading branch information
rosiel authored Nov 15, 2023
2 parents 6123bf9 + 65359c4 commit 80cb9e4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ starter_dev: generate-secrets
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 -T drupal with-contenv bash -lc 'chown -R nginx:nginx /var/www/drupal/ ; su nginx -s /bin/bash -c "composer install"'
$(MAKE) starter-finalize ENVIRONMENT=starter_dev


Expand Down Expand Up @@ -491,7 +491,12 @@ set-files-owner: $(SRC)
ifndef SRC
$(error SRC is not set)
endif
sudo chown -R $(shell id -u):101 $(SRC)
@echo "Changing ownership of $(SRC) to $(shell id -u):101"
@if sudo chown -R $(shell id -u):101 $(SRC); then \
echo "Ownership changed successfully."; \
else \
echo "Error: Failed to change ownership."; \
fi


# RemovesForces the site uuid to match that in the config_sync_directory so that
Expand Down Expand Up @@ -554,7 +559,7 @@ starter-init: generate-secrets

.PHONY: starter-finalize
starter-finalize:
docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx .'
docker compose exec -T drupal with-contenv bash -lc 'chown -R nginx:nginx . ; echo "Chown Complete"'
$(MAKE) drupal-database update-settings-php
docker compose exec -T drupal with-contenv bash -lc "drush si -y --existing-config minimal --account-pass '$(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD)'"
docker compose exec -T drupal with-contenv bash -lc "drush -l $(SITE) user:role:add fedoraadmin admin"
Expand Down

0 comments on commit 80cb9e4

Please sign in to comment.