-
Notifications
You must be signed in to change notification settings - Fork 61
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
Conversation
From the tech call today, if this PR works adjust the syntax from the resulting docs from this older PR too |
Co-authored-by: Chris Burgess <chris@giantrobot.co.nz>
Co-authored-by: Chris Burgess <chris@giantrobot.co.nz>
@xurizaemon Thanks! It worked. |
Makefile
Outdated
@@ -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'" |
There was a problem hiding this comment.
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?
OS: Pop!_OS 22.04 LTS docker-compose exec --user nginx -T drupal with-contenv bash -lc "composer install"
|
Revert running as nginx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with make starter_dev and it worked. I checked the permissions in the drupal container and everything was set to nginx.
I tested make composer_update and got this error: It's missing the other quotation mark in front of su. When I added that it ran fine. |
Should be ready for testing |
Switch the double quotes with the single quotes and that seemed to fix one issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the errors I was having! Thanks Don!!
Running composer install or update frequently causes modules to install as root. This should prevent that.