EasyEngine / EasyEngine/easyengine

[POC] Using Bind Mounts for Non-root access

Open
#1,563 3 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.