Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run composer commands as nginx #329

Merged
merged 9 commits into from
Sep 27, 2023
Merged
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ local: generate-secrets
fi
$(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=local
docker-compose up -d --remove-orphans
docker-compose exec -T drupal with-contenv bash -lc 'composer install; chown -R nginx:nginx .'
docker-compose exec --user nginx -T drupal with-contenv bash -lc "composer install"
docker-compose exec -T drupal with-contenv bash -lc "chown -R nginx:nginx ."
$(MAKE) remove_standard_profile_references_from_config drupal-database update-settings-php ENVIRONMENT=local
docker-compose exec -T drupal with-contenv bash -lc "drush si -y islandora_install_profile_demo --account-pass $(shell cat secrets/live/DRUPAL_DEFAULT_ACCOUNT_PASSWORD)"
$(MAKE) delete-shortcut-entities && docker-compose exec -T drupal with-contenv bash -lc "drush pm:un -y shortcut"
Expand Down Expand Up @@ -185,7 +186,7 @@ starter_dev: generate-secrets
fi
$(MAKE) set-files-owner SRC=$(CURDIR)/codebase ENVIRONMENT=starter_dev
docker-compose up -d --remove-orphans
docker-compose exec -T drupal with-contenv bash -lc 'composer install'
docker-compose exec --user nginx -T drupal with-contenv bash -lc "composer install"
$(MAKE) starter-finalize ENVIRONMENT=starter_dev


Expand Down Expand Up @@ -309,7 +310,7 @@ download-default-certs:

# Run Composer Update in your Drupal container
composer_update:
docker-compose exec -T drupal with-contenv bash -lc 'composer update'
docker-compose exec -T drupal with-contenv bash -lc su nginx -s /bin/bash -c 'composer update'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be changed to match the other changes using the --user nginx instead of su nginx -s /bin/bash -c?



reindex-fcrepo-metadata:
Expand Down