-
Notifications
You must be signed in to change notification settings - Fork 397
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
Loading databases for each multisite #1227
Comments
Ah I think I'm starting to see why this support isn't available yet: Ideally we would want to execute a local:sync like command for each of the sites within the multisite. This command accept two inputs for the remote and local databases. It would be really nice to use the foreach phing statement to loop over a list of sites to execute this command. However:
2 and 3 can be solved but 1 cannot (until phing 3 is out, stable, and supported by blt). Without 1 we're left with requiring the developer copy / paste sample code into a project.local.yml to override local:sync to support multisite. @danepowell am I missing something with that analysis? |
Oh wow, don't know how I missed this but there's a example.multsite.yml that I didn't find in the documentation that declares a ${project.cloud_alias} that seems really useful. But it doesn't appear to be used in anywhere. Specifically it does seem to be used in local:sync at all. |
OHEY I think I figured this out using Phing 2: My build.xml:
In my project.yml, I added:
Where site1, site2, site3, where proper parts of a drush alias that looks like @my_multisite.site1.test that points to the staging version of the remote site. Oh, and I also setup proper drush aliases for each of these remote sites so that they work. I haven't tested this yet, that comes next. Just got excited about how this solution works around the "need multiple parameters for the foreach to work" problem. |
@cosmicdreams - take a look at multisite.md. It describes how you can sync site-specific databases. |
Hi @bobbygryzynger I have. And that's how I got this far. And ... Oh there's documentation here I haven't seen before. Yes, the use of site.yml would improve / reduce the complexity of handling the proper config. However, the documentation doesn't seem to cover how to get local:refresh to refresh all of the sites of the multisite. I guess if I want that I could still use the foreach above, but without the extra config that duplicates what site.yml does more efficiently |
Right now, I think BLT + DrupalVM only support a single site at a time, and the related BLT aliases (i.e. However it looks like @grasmash might be working to change that 😄 |
Hi all, really inspired by all the work going in here to support multisite configurations.
I was wondering if @danepowell could give guidance / documentation on how to load a database per site within the multisite. Perhaps this config has not been included yet because not every multisite will need to load a database per site during local:sync. But I do.
The text was updated successfully, but these errors were encountered: