EasyEngine / EasyEngine/easyengine
[POC] Using Bind Mounts for Non-root access
- Dominant language
- PHP
- Stars
- 2.2k
- Forks
- 424
- PR merge metrics
- No merged PRs in 30d
Description
## Context
For non-root access to site files, we have to move from Volume mounts to Bind mounts.
It also gives the flexibility to move site files to another location as well as _initiate site in a git dir :tada:_
## Working
1. Create a site directory to some other path.
```shell
mkdir -p /home/vagrant/site/example.com
```
2. Copy the contents of `app` to the new directory
```shell
cp /opt/easyengine/sites/example.com/app/* /home/vagrant/site/example.com/
```
3. Change permissions of the newly copied files
```shell
chown -R home/vagrant/site/example.com/
```
4. Update site `docker-compose.yml`
Replace `"htdocs:/var/www"` with `"/home/vagrant/site/example.com:/var/www"` under
```
services > { php , nginx } > volumes
```
5. Disable and enable site.
## ToDo
- [x] Need to check host user groups and other related filesystem permissions to make the edits working with www-data user of the container.
on host: `adduser vagrant www-data`
maybe this also `sudo chmod -R g+w /srv/www`
Contributor guide
Assessment
This issue has not been assessed yet.