Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 07bf653

Browse files
danepowellgrasmash
authored andcommitted
Support for multisite deploys (#1092)
* Support multisite deployments. * Fixed Behat multisite tests.
1 parent aff9af9 commit 07bf653

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

phing/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ drupal:
6767

6868
drush:
6969
bin: ${composer.bin}/drush
70-
cmd: ${drush.bin} @${drush.alias} -l ${multisite.name}
70+
cmd: ${drush.bin} @${drush.alias} -l default
7171
dir: ${docroot}
72-
uri: ${multisite.name}
72+
uri: default
7373
assume: yes
7474
passthru: yes
7575
logoutput: yes

phing/tasks/deploy.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@
235235
<property name="drush.bin" value="${drush.bin} --include=../drush" override="true" />
236236
<!-- Environment parameter is used to determine which modules to toggle. On ACE, will be overridden by one of dev/stage/prod. -->
237237
<param name="environment" value="deploy"/>
238-
<!-- Drush alias should be set to self, but can be overridden for multisite. -->
239-
<property name="drush.alias" value="self"/>
238+
<!-- Drush alias should be set to sites to update all sites. -->
239+
<property name="drush.alias" value="sites"/>
240240
<!-- Most sites store their version-controlled configuration in /config/default. -->
241241
<!-- ACE internally sets the vcs configuration directory to /config/default, so we use that. -->
242242
<property name="cm.config-dir.key" value="${cm.config-dir.deploy-key}"/>

phing/tasks/tests.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
<echo message="Running server at ${behat.server-url}"/>
274274
<exec command="pkill -f runserver" logoutput="true" level="${blt.exec_level}" passthru="true"/>
275275
<exec executable="${drush.bin}" dir="${docroot}" spawn="true" level="${blt.exec_level}">
276-
<arg line="runserver ${behat.server-url} -l ${multisite.name}"/>
276+
<arg line="runserver ${behat.server-url}"/>
277277
</exec>
278278
<echo message="Waiting 10 seconds for ${behat.server-url} to become available."/>
279279
<waitfor maxwait="10" maxwaitunit="second" checkevery="1" checkeveryunit="second">

readme/multisite.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Start by following the [Acquia Cloud multisite instructions](https://docs.acquia
1414
if (file_exists('/var/www/site-php')) {
1515
require '/var/www/site-php/mysite/multisitename-settings.inc';
1616
}
17-
17+
1818
require DRUPAL_ROOT . "/../vendor/acquia/blt/settings/blt.settings.php";
1919

2020
## BLT setup
@@ -23,6 +23,13 @@ Start by setting `$site_dir` in each site's settings.php, prior to the `blt.sett
2323

2424
$site_dir = 'example.com';
2525

26+
You will also need to define your multisites in `blt/project.yml` by creating a `multisite.name` variable. This allows BLT to run setup and deployment tasks for each site in the codebase.
27+
28+
multisite:
29+
name:
30+
- default
31+
- example.com
32+
2633
Ensure that your new project has `$settings['install_profile']` set, or Drupal core will attempt (unsuccessfully) to write it to disk!
2734

2835
At this point you should have a functional multisite codebase that can be installed on Acquia Cloud.

0 commit comments

Comments
 (0)