Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folder structure for auto site setups is inflexible #771

Closed
iandunn opened this issue Oct 23, 2015 · 3 comments
Closed

Folder structure for auto site setups is inflexible #771

iandunn opened this issue Oct 23, 2015 · 3 comments

Comments

@iandunn
Copy link

iandunn commented Oct 23, 2015

In the Meta Environment, we've run into an issue where users have to clone the repo to a specific folder name in order for provisioning to work.

We have a folder structure like:

{vvv_root}/wordpress-meta-environment/wordcamp.dev/logs
{vvv_root}/wordpress-meta-environment/wordcamp.dev/provision
{vvv_root}/wordpress-meta-environment/wordcamp.dev/public_html

That keeps things clean and organized, but it prevents us from using {vvv_path_to_folder} in our Nginx conf files, because the resulting path would be

/srv/www/wordpress-meta-environment/wordcamp.dev/provision/
instead of
/srv/www/wordpress-meta-environment/wordcamp.dev/

So we've just hardcoded /srv/www/wordpress-meta-environment for now. That works if the user clones the directory with that name, but it breaks if they choose a custom folder name.

There are two approaches I can think of to improve the situation for all auto-site-setups:

  1. Provide a way for auto-site-setups to customize the replacement value of vvv_path_to_folder.

  2. Provide a way for auto-site-setups to hook into provision-post.sh.

I'm thinking that there'd be a default /provision/provision-post.sh file that would find /srv/www -maxdepth 5 -name 'provision-post.sh', and source the results.

This seems like it might be the better approach, because it would allow for a lot of other customization as well, beyond just this situation.

With something like this in place, we could just setup out own {wme_path_to_folder} placeholders and do our own sed replace in our child provision-post.sh.

There'd be some back-compat issues, though, since some users will have already created their own provision-post.sh files (#48).

Any thoughts on the above approaches, or better ideas?

@jeremyfelt
Copy link
Member

This should now all be possible after the merge of #980. Sorry for never leaving feedback, @iandunn!

@iandunn
Copy link
Author

iandunn commented Nov 4, 2016

No worries, thanks the merge, and kudos to @LoreleiAurora for the awesome work in #980 :)

@lock
Copy link

lock bot commented Feb 22, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants