Skip to content

Commit 62427d3

Browse files
committed
Merge branch 'develop' for vd4.0.11
2 parents c65fda8 + f55eb6c commit 62427d3

File tree

10 files changed

+90
-67
lines changed

10 files changed

+90
-67
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.10
1+
4.0.11

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
"easyengine/cron-command": "v1.0.2",
3434
"easyengine/log-command": "v1.0.1",
3535
"easyengine/mailhog-command": "v1.0.2",
36-
"easyengine/site-command": "v2.3.0",
37-
"easyengine/site-type-wp": "v1.0.8",
38-
"easyengine/site-type-php": "v1.0.8",
39-
"easyengine/service-command": "v1.0.8",
40-
"easyengine/shell-command" : "v1.0.2",
36+
"easyengine/site-command": "v2.3.1",
37+
"easyengine/site-type-wp": "v1.0.9",
38+
"easyengine/site-type-php": "v1.0.9",
39+
"easyengine/service-command": "v1.0.9",
40+
"easyengine/shell-command" : "v1.0.3",
4141
"justinrainbow/json-schema": "5.2.7",
4242
"monolog/monolog": "1.24.0",
4343
"mustache/mustache": "2.12.0",

composer.lock

Lines changed: 46 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

img-versions.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
"easyengine/cron": "v4.0.0",
33
"easyengine/mailhog": "v4.0.0",
44
"easyengine/mariadb": "v4.0.0",
5-
"easyengine/nginx-proxy": "v4.0.1",
5+
"easyengine/nginx-proxy": "v4.0.2",
66
"easyengine/nginx": "v4.0.0",
7-
"easyengine/php": "v4.0.0",
7+
"easyengine/php": "v4.0.2",
88
"easyengine/php5.6": "v4.0.0",
99
"easyengine/postfix": "v4.0.0",
10-
"easyengine/redis": "v4.0.0"
10+
"easyengine/redis": "v4.0.0",
11+
"easyengine/newrelic-daemon": "v4.0.0"
1112
}

php/EE/Migration/Containers.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ public static function start_container_migration() {
2828
$updated_images = [];
2929

3030
foreach ( $img_versions as $img => $version ) {
31-
if ( 'easyengine/php5.6' === $img ) {
32-
continue;
33-
}
34-
if ( $current_versions[ $img ] !== $version ) {
35-
$updated_images[] = $img;
31+
if ( array_key_exists( $img, $current_versions ) ) {
32+
if ( $current_versions[ $img ] !== $version ) {
33+
$updated_images[] = $img;
34+
self::pull_or_error( $img, $version );
35+
}
36+
} else {
3637
self::pull_or_error( $img, $version );
3738
}
3839
}

php/EE/Migration/GlobalContainers.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ public static function down_global_containers( $updated_images ) {
7676
foreach ( $updated_images as $image_name ) {
7777
$global_container_name = $all_global_images[ $image_name ];
7878
$global_service_name = ltrim( $global_container_name, 'services_' );
79-
$global_service_name = rtrim( $global_service_name, '_1' );
80-
EE::debug( "Removing $global_container_name" );
79+
$remove_suffix = explode( '_1', $global_service_name );
80+
$global_service_name = empty( $remove_suffix[0] ) ? $global_service_name : $remove_suffix[0];
81+
EE::debug( "Removing $global_container_name" );
8182

8283
if ( false !== \EE_DOCKER::container_status( $global_container_name ) ) {
8384
if ( ! EE::exec( "docker-compose stop $global_service_name && docker-compose rm -f $global_service_name" ) ) {
@@ -94,8 +95,11 @@ public static function down_global_containers( $updated_images ) {
9495
* @throws \Exception
9596
*/
9697
public static function global_service_up( $service_name ) {
98+
$global_service_name = ltrim( $service_name, 'services_' );
99+
$remove_suffix = explode( '_1', $global_service_name );
100+
$global_service_name = empty( $remove_suffix[0] ) ? $global_service_name : $remove_suffix[0];
97101
EE::debug( 'Start ' . $service_name . ' container up' );
98-
if ( 'global-nginx-proxy' === $service_name ) {
102+
if ( 'global-nginx-proxy' === $global_service_name ) {
99103
\EE\Service\Utils\nginx_proxy_check();
100104
} else {
101105
\EE\Service\Utils\init_global_container( $service_name );
@@ -124,8 +128,13 @@ public static function global_service_down( $service_name ) {
124128
* @return array
125129
*/
126130
public static function get_all_global_images_with_service_name() {
131+
132+
$launch = EE::launch( sprintf( 'docker ps -f "id=%s" --format={{.Names}}', EE_PROXY_TYPE ) );
133+
if ( 0 === $launch->return_code ) {
134+
$nginx_proxy = trim( $launch->stdout );
135+
}
127136
return [
128-
'easyengine/nginx-proxy' => EE_PROXY_TYPE,
137+
'easyengine/nginx-proxy' => $nginx_proxy,
129138
'easyengine/mariadb' => GLOBAL_DB_CONTAINER,
130139
'easyengine/redis' => GLOBAL_REDIS_CONTAINER,
131140
// 'easyengine/cron' => EE_CRON_SCHEDULER, //TODO: Add it to global docker-compose.

php/EE/Runner.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ private function init_ee() {
6868
$check_requirements = ( [ 'site', 'cmd-dump' ] === $this->arguments ) ? false : $check_requirements;
6969
}
7070

71+
$nginx_proxy = 'services_global-nginx-proxy_1';
72+
$launch = EE::launch( sprintf( 'cd %s && docker ps -q --no-trunc | grep $(docker-compose ps -q global-nginx-proxy)', EE_SERVICE_DIR ) );
73+
if ( 0 === $launch->return_code ) {
74+
$nginx_proxy = trim( $launch->stdout );
75+
}
76+
define( 'EE_PROXY_TYPE', $nginx_proxy );
77+
7178
if ( $check_requirements ) {
7279
$this->check_requirements();
7380
$this->maybe_trigger_migration();

0 commit comments

Comments
 (0)