We're exploring alternative layouts for the vagrant-drupal repo structure.
Assuming we want to keep Vagrantfile and Berksfile in git, and assuming that we have an existing Drupal project repo, the layout will be as follows:
- project
- site
- db
- scripts
- .git
- Berksfile
- Vagrantfile
- .git
The copy command will look as follows:
cp -R /vagrant/project /var/shared/sites/cooked.drupal
In this case there needs to be another attribute pointing to Drupal root in deployment directory (or equivalently in the [project] folder).
This is problematic because Vagrantfile and Berksfile cannot be added to the project repo
without creating a new repo merging the two .git
s, or adding one to
another as a git submodule.
The project structure is as follows:
- site
- index.php
- db
- scripts
- Vagrantfile
- Berksfile
- .git
The copy command would be as follows
cp -R /vagrant /var/shared/sites/cooked.drupal
This requires exposing a chef attribute for VHOST_ROOT, which is where apache would serve from. In this case, it would be '/var/shared/sites/cooked.drupal/site'.
Keep in mind that we don't want to hardcode /vagrant anywhere in the cookbook.