dashbrew icon indicating copy to clipboard operation
dashbrew copied to clipboard

Symlinking project folders in public/

Open wdmtech opened this issue 9 years ago • 12 comments

I've tried symlinking a project folder from ~/Dev/myblog to public/myblog/ but it's not getting added during provisioning. I have .dashbrew and index.php files at the symlink's target. Are symlinked project folders supported by dashbrew?

OSX Yosemite 10.10.2

wdmtech avatar Mar 27 '15 20:03 wdmtech

I'm trying to get the same thing working, no luck yet :( Is there any chance this might get supported? Would love to be able to just symlink new projects and provision :)

Tried both on OSX Yosemite and Ubuntu 14.10

te-gpm avatar Mar 31 '15 15:03 te-gpm

It looks like the synced folder type doesn't support symlinks, but I know rsync does, so I am going to try changing:

config.vm.synced_folder "public/", "/var/www/", group: 'www-data', :owner => "vagrant"

in the Vagrantfile to use rsync instead and see what happens!

wdmtech avatar Apr 01 '15 10:04 wdmtech

Did you have any success? Care to share your possible solution? :)

te-gpm avatar Apr 09 '15 12:04 te-gpm

Not yet! Will see if I can have a go at it tonight :)

wdmtech avatar Apr 09 '15 12:04 wdmtech

Have tried various options in an attempt to get rsync to sync a symlinked folder's contents to the guest, but I've not been able to get it to follow a symlink in such a manner.

config.vm.synced_folder "public/", "/var/www/", group: 'www-data', :owner => "vagrant", type: "rsync", rsync__args: ["--verbose", "-rLKptgod", "-z"]

wdmtech avatar Apr 10 '15 17:04 wdmtech

Try to create a folder with .dashboard, run provisioner and replace the folder with a symlink.

vkvasnytsky avatar Apr 12 '15 15:04 vkvasnytsky

@phpid Not working for me, as soon as I symlink and provision the project is no longer detected and thrown out upon provisioning :(

te-gpm avatar Apr 13 '15 08:04 te-gpm

  1. create folder
  2. provision
  3. replace folder by a link

vkvasnytsky avatar Apr 13 '15 09:04 vkvasnytsky

Unfortunatelly that always results in a 403, no matter how generous I set the file permissions. After halting the machine and upping again it no longer detects the symlinked project and throws it out :(

te-gpm avatar Apr 13 '15 11:04 te-gpm

It will NOT detect linked directories. Current implementation of the provisioner is looking for physical folders. You can either replace a folder by a link after provision or patch the provisioner to include linked folders.

vkvasnytsky avatar Apr 13 '15 12:04 vkvasnytsky

Thanks @phpid, which synced/shared method should we use for this? (MacOS)

wdmtech avatar Apr 17 '15 10:04 wdmtech

It really depends on a size of your project. I tried shared folders, NFS and Parallels provider due to a size of my project - 40K files and 12K directories. It does not matter for a small project. Otherwise, Parallels or VMWare will be the best choice.

vkvasnytsky avatar Apr 17 '15 13:04 vkvasnytsky