Hi,
we are currently trying to implement a workflow for deploying our Shopware 6 instance to a Ubuntu server from a Gitlab repo using Deployer.
The deployment seems to work fine, problems still arise with the users that we are using:
The deployment is done via a user „deployer“ that can login via SSH key and is able to sudo. The nginx webserver uses „www-data“ for the vhost. Adter deployment all files belong to „deployer“, which is a problem, since Shopware needs to write files etc. during operation. Assuming the directory „current“ needs to belong to „www-data“, we saw that Deployer is already able to chmod the files to the local user after deployment. This would need an elevation of rights though, which in turn would need a password (instead of the SSH key) and couldn’t be done automatically.
What would be the best practice approach here? Running nginx with a different user? Adjusting any group memberships/rights/etc.?