Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
Fixes geerlingguy#1265: Document reverse-mount shares. Also scaffolds…
Browse files Browse the repository at this point in the history
… Issue geerlingguy#1258.
  • Loading branch information
geerlingguy authored and sonfd committed May 19, 2017
1 parent 6960d22 commit fa3ccd6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/deployment/git.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
You can deploy a codebase directly inside Drupal VM via Git. You can deploy a Git-based Drupal site directly into a shared folder, or you can even deploy inside Drupal VM's own filesystem. The latter option offers better performance than any of the other deployment methods, since Drupal VM can use native filesystem caches and disk access.

This is also the recommended method for deploying Drupal sites to Drupal VM when used [in production](../other/production.md)

## Deploying Drupal via Git

TODO: See https://github.com/geerlingguy/drupal-vm/issues/1258.
23 changes: 23 additions & 0 deletions docs/other/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,26 @@ In a custom `Vagrantfile.local`, add user access to Vagrant:

config.winnfsd.uid=900
config.winnfsd.gid=900

### Better performance: Sharing from Drupal VM to your PC

The fastest option for Drupal VM is to install the Drupal codebase entirely inside Drupal VM, without using a Vagrant shared folder. This method ensures the code runs as fast as it would if it were natively running on your PC, but it requires some other form of codebase synchronization, and means there is at least a tiny bit of lag between saving files in your editor and seeing the changes inside Drupal VM.

If you use one of these techniques, it's recommended you use the [Git deployment technique](../deployment/git.md) to clone your Drupal codebase into Drupal VM from a Git repository.

#### Syncing files via rsync or SSH

If you use an IDE like PhpStorm, you can configure it to synchronize a local codebase with the code inside Drupal VM using SSH (SFTP). There are also tools that mount directories into Windows Explorer using plain SSH and SFTP, though configuring these tools can be difficult.

If at all possible, make sure your IDE is configured to automatically synchronize changes.

#### Share files using Samba inside Drupal VM

Though it's not supported natively by Vagrant, you can mount a Samba share _from the VM guest_ to your host PC. To do this, you have to:

1. Install Samba inside the VM.
2. Configure Samba (through `smb.conf`) to share a directory inside the VM.
3. Open firewall ports `137`, `138`, `139`, and `445`.
4. Mount the Samba shared folder within Windows Explorer (e.g. visit `\\drupalvm.dev\share_name`)

Read this blog post for further detail in creating a Samba share: [Configure a reverse-mounted Samba shared folder](https://www.jeffgeerling.com/blog/2017/drupal-vm-on-windows-fast-container-blt-project-development#reverse-share).
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pages:
- 'Using composer.json': 'deployment/composer.md'
- 'Using a Drush Make file': 'deployment/drush-make.md'
- 'Drupal VM as a Composer Dependency': 'deployment/composer-dependency.md'
- 'Deploying Drupal via Git': 'deployment/git.md'
- Basic configurations:
- 'Using different base OSes': 'configurations/base-os.md'
- 'Using a different PHP version': 'configurations/php.md'
Expand Down

0 comments on commit fa3ccd6

Please sign in to comment.