EasyEngine / site-type-wp

Adds 'wp' site type to EasyEngine
12 stars 14 forks source link

Add --vip flag to setup VIP GO site. #106

Closed rahulsprajapati closed 5 years ago

rahulsprajapati commented 5 years ago
  1. ee site create develop-vip-test.local --vip="git@github.com:wpcomvip/repo.git"
    • Setup wp site with repo url provided in --vip parameter. ( it can be any github repo with wp-content repo. )
  2. ee site create develop-vip-test.local --vip
  3. ee site create develop-vip-test.local --vip --mu=subdir
    • Setup VIP site with subdirectory multisite setup
  4. ee site create develop-vip-test.local --vip --mu=subdom
    • Setup VIP site with sub domain multisite setup

ref: https://vip.wordpress.com/documentation/vip-go/local-vip-go-development-environment/

dimadin commented 5 years ago

I actually wanted to explore adding support for Composer-powered WordPress (like Bedrock) and I thought that you should create new type of site (so you would have ee site create example.com --type=bedrock, or in case of this issue ee site create example.com --type=wpcomvipgo).

Should different flavors of WordPress installations have their own site type, or there should be flags such as --vip under main wp site type? I am worried that with second case we may end up in situation as in EEv3 where we have many cache options which then created many options which are hard to maintain (#107 already introduces many ifs).

rahul286 commented 5 years ago

@dimadin Thanks for your inputs. 🙂

I think ideally this should have been done using WordPress like hooks.

In this case, we are performing additional actions "after" a site is created. Also, we do not need to tweak other functions such as delete.

As we do not have hooks and package distribution infrastructure ready, we are keeping it here for now.

Coming back to your case, I don't know much about bedrock. So sorry for my inability to give precise inputs. If bedrock support needs more changes than --vip flag. you may create a custom command for now https://easyengine.io/handbook/developer/custom-command/ . Please note that we do not have a way to distribute commands as of now but that's certainly on the wishlist.

Also, you may like to discuss bedrock support on "feature requests" repo here https://github.com/EasyEngine/feature-requests/issues