@@ -137,8 +137,10 @@ public function create( $args, $assoc_args ) {
137137 $ this ->cache_type = \EE \Utils \get_flag_value ( $ assoc_args , 'cache ' );
138138 $ this ->site_data ['site_ssl ' ] = \EE \Utils \get_flag_value ( $ assoc_args , 'ssl ' );
139139 $ this ->site_data ['site_ssl_wildcard ' ] = \EE \Utils \get_flag_value ( $ assoc_args , 'wildcard ' );
140+ $ this ->site_data ['app_sub_type ' ] = 'php ' ;
140141
141142 if ( ! empty ( $ assoc_args ['with-db ' ] ) ) {
143+ $ this ->site_data ['app_sub_type ' ] = 'mysql ' ;
142144 $ this ->site_data ['db_name ' ] = str_replace ( [ '. ' , '- ' ], '_ ' , $ this ->site_data ['site_url ' ] );
143145 $ this ->site_data ['db_host ' ] = \EE \Utils \get_flag_value ( $ assoc_args , 'dbhost ' , 'db ' );
144146 $ this ->site_data ['db_port ' ] = '3306 ' ;
@@ -204,7 +206,7 @@ public function info( $args, $assoc_args ) {
204206 $ info [] = [ 'Access admin-tools ' , $ prefix . $ this ->site_data ['site_url ' ] . '/ee-admin/ ' ];
205207 }
206208
207- if ( ! empty ( $ this ->site_data ['db_host ' ] ) ) {
209+ if ( ' mysql ' === $ this ->site_data ['app_sub_type ' ] ) {
208210 $ info [] = [ 'DB Root Password ' , $ this ->site_data ['db_root_password ' ] ];
209211 $ info [] = [ 'DB Name ' , $ this ->site_data ['db_name ' ] ];
210212 $ info [] = [ 'DB User ' , $ this ->site_data ['db_user ' ] ];
@@ -250,7 +252,7 @@ private function configure_site_files() {
250252 'group_id ' => $ process_user ['gid ' ],
251253 ];
252254
253- if ( ! empty ( $ this ->site_data ['db_host ' ] ) ) {
255+ if ( ' mysql ' === $ this ->site_data ['app_sub_type ' ] ) {
254256 $ filter [] = $ this ->site_data ['db_host ' ];
255257 $ local = ( 'db ' === $ this ->site_data ['db_host ' ] ) ? true : false ;
256258 $ db_host = $ local ? $ this ->site_data ['db_host ' ] : $ this ->site_data ['db_host ' ] . ': ' . $ this ->site_data ['db_port ' ];
@@ -413,9 +415,10 @@ private function create_site_db_entry() {
413415 'site_ssl_wildcard ' => $ this ->site_data ['site_ssl_wildcard ' ] ? 1 : 0 ,
414416 'php_version ' => '7.2 ' ,
415417 'created_on ' => date ( 'Y-m-d H:i:s ' , time () ),
418+ 'app_sub_type ' => $ this ->site_data ['app_sub_type ' ],
416419 ];
417420
418- if ( ! empty ( $ this ->site_data ['db_host ' ] ) ) {
421+ if ( ' mysql ' === $ this ->site_data ['app_sub_type ' ] ) {
419422 $ data ['db_name ' ] = $ this ->site_data ['db_name ' ];
420423 $ data ['db_user ' ] = $ this ->site_data ['db_user ' ];
421424 $ data ['db_host ' ] = $ this ->site_data ['db_host ' ];
@@ -461,7 +464,7 @@ public function restart( $args, $assoc_args, $whitelisted_containers = [] ) {
461464
462465 $ whitelisted_containers = [ 'nginx ' , 'php ' ];
463466
464- if ( ! empty ( $ this ->site_data ['db_host ' ] ) ) {
467+ if ( ' mysql ' === $ this ->site_data ['app_sub_type ' ] ) {
465468 $ whitelisted_containers [] = 'db ' ;
466469 }
467470 parent ::restart ( $ args , $ assoc_args , $ whitelisted_containers );
0 commit comments