Shared folders

Systems

Drupal

var shared = {
    'site-default': 'sites/default',
    '.htaccess': true
};
  1. .htaccess
  2. default folder - sites/default

Wordpress

var shared = {
    'site-default': 'sites/default',
    '.htaccess': true
};
  1. .htaccess
  2. .env

Angular

var shared = {
    'site-default': 'sites/default',
    '.htaccess': true
};
  1. storage

How it works

Setup

var shared = {
    'site-default': 'sites/default',
    '.htaccess': true
};

Init

        remote.sudo('mkdir -p ' + dir + '/shared', { user: user });

Deploy

        Object.keys(shared).forEach(function(key) {
            var s = dir + '/shared/' + key;
            var name = shared[key];
            if(name === true) {
                name = key;
            }
            var t = release + '/' + name;
            remote.sudo('ln -s ' + s + ' ' + t, { user: user });
        });