forumone / web-starter

Starting place for developing Drupal, Wordpress and other web applications
http://forumone.github.io/web-starter/
22 stars 11 forks source link

Document where to put temp, private files #193

Closed mortona42 closed 8 years ago

mortona42 commented 8 years ago

Should temp be /tmp?

Should private files be ../private?

johnbburg commented 8 years ago

Temp should be /tmp. That's also hardcoded in the settings.vm.php example. Although that only applies to the VM. This was done because the temp directory can be in different locations depending on the hosting provider. Which may be a non-existent path within the VM.

I think you want to avoid relative paths in the private files directory and in general. ../private can be interpreted to be within the current build's repository root, i.e the contents of /var/www/vhosts/site.www/current/private, which will change on every build, rather than the /var/www/vhosts/site.www/shared/private path.

wwhurley commented 8 years ago

If you have any directories, including private uploads, that should be shared across releases of the software they should be added to https://github.com/forumone/web-starter/blob/1.1.x/config/deploy.rb#L29 so they can be symlinked into place. We should not be using absolute paths to reference directories.

mortona42 commented 8 years ago

Thanks for that info John, how should tmp be configured for f1 hosting?

William, where would you recommend putting that private file directory? If we specify /var/www/vhosts/site.www/shared/private, how should that be stated in deploy.rb?

I'm hearing conflicting things on absolute vs relative paths.

wwhurley commented 8 years ago

On the line listed in the deploy.rb file you would add a space and then private. So it would look like:

set :linked_dirs, %w{public/sites/default/files private}

That is a white-space delimited array of paths to create in ./shared directory relative to the deployment base path and then symlink into the appropriate directory in the release.

I would recommend having it as ../private

mortona42 commented 8 years ago

I added private as specified (looks like it uses [] instead of {} for the array), now I can see that in the /shared directory.

I'm not getting how the symlink is specified though.

wwhurley commented 8 years ago

The symlink happens automatically. By for each path in that array it creates a directory in the shared directory and then symlink it to the same place in each release.

On Thu, Apr 14, 2016, 8:21 PM Andrew Morton notifications@github.com wrote:

I added private as specified (looks like it uses [] instead of {} for the array), now I can see that in the /shared directory.

I'm not getting how the symlink is specified though.

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/forumone/web-starter/issues/193#issuecomment-210216939

William Hurley Chief Technology Officer

whurley@forumone.com www.forumone.com 703.894.4346

_Forum One_: Extend Your Influence

mortona42 commented 8 years ago

So the symlink for /shared/private goes into /current/private (or /releases/XXXX/private), which is why specifying ../private for the directory works. Thanks!

mortona42 commented 8 years ago

Updated wiki: https://github.com/forumone/web-starter/wiki/Quick-and-dirty:-how-to-use-our-web-starter-environment

We probably need an official place for f1 hosting documentation.