@@ -70,7 +70,7 @@ public function up() {
7070 'EE\Migration\SiteContainers::backup_restore ' ,
7171 'EE\Migration\ChangeGlobalServiceContainerNames::restore_yml_file ' ,
7272 [ $ global_compose_file_path , $ global_compose_file_backup_path ],
73- [ $ global_compose_file_backup_path , $ global_compose_file_path ]
73+ [ $ global_compose_file_backup_path , $ global_compose_file_path, $ running_containers ]
7474 );
7575
7676 /**
@@ -147,13 +147,18 @@ public function down() {
147147 *
148148 * @param $source string path of source file.
149149 * @param $destination string path of destination.
150+ * @param $containers array of running containers.
151+ *
152+ * @throws \Exception
150153 */
151- public static function restore_yml_file ( $ source , $ destination ) {
154+ public static function restore_yml_file ( $ source , $ destination, $ containers ) {
152155 EE \Migration \SiteContainers::backup_restore ( $ source , $ destination );
153-
154156 chdir ( EE_SERVICE_DIR );
155157
156- EE ::exec ( 'docker-compose up -d ' );
158+ $ running_containers = implode ( ' ' , $ containers );
159+ if ( ! EE ::exec ( sprintf ( 'docker-compose up -d %s ' , $ running_containers ) ) ) {
160+ throw new \Exception ( 'Unable to start ee-containers ' );
161+ }
157162 }
158163
159164 /**
0 commit comments