From 92c9e0b6570207109b78b00de453d8cc059e1e1d Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Fri, 10 Aug 2018 15:55:36 +0530 Subject: [PATCH 1/2] Get image versions from utils Signed-off-by: Riddhesh Sanghvi --- src/Site_WP_Docker.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Site_WP_Docker.php b/src/Site_WP_Docker.php index c02c061..983d050 100644 --- a/src/Site_WP_Docker.php +++ b/src/Site_WP_Docker.php @@ -14,14 +14,15 @@ class Site_WP_Docker { * @return String docker-compose.yml content string. */ public function generate_docker_compose_yml( array $filters = [] ) { - $base = []; + $img_versions = EE\Utils\get_image_versions(); + $base = []; $restart_default = [ 'name' => 'always' ]; $network_default = [ 'name' => 'site-network' ]; // db configuration. $db['service_name'] = [ 'name' => 'db' ]; - $db['image'] = [ 'name' => 'easyengine/mariadb:v' . EE_VERSION ]; + $db['image'] = [ 'name' => 'easyengine/mariadb:' . $img_versions['easyengine/mariadb'] ]; $db['restart'] = $restart_default; $db['labels'] = [ 'label' => [ @@ -46,7 +47,7 @@ public function generate_docker_compose_yml( array $filters = [] ) { $db['networks'] = $network_default; // PHP configuration. $php['service_name'] = [ 'name' => 'php' ]; - $php['image'] = [ 'name' => 'easyengine/php:v' . EE_VERSION ]; + $php['image'] = [ 'name' => 'easyengine/php:' . $img_versions['easyengine/php'] ]; $php['depends_on'] = [ 'name' => 'db' ]; $php['restart'] = $restart_default; $php['labels'] = [ @@ -77,7 +78,7 @@ public function generate_docker_compose_yml( array $filters = [] ) { // nginx configuration. $nginx['service_name'] = [ 'name' => 'nginx' ]; - $nginx['image'] = [ 'name' => 'easyengine/nginx:v' . EE_VERSION ]; + $nginx['image'] = [ 'name' => 'easyengine/nginx:' . $img_versions['easyengine/nginx'] ]; $nginx['depends_on'] = [ 'name' => 'php' ]; $nginx['restart'] = $restart_default; @@ -107,7 +108,7 @@ public function generate_docker_compose_yml( array $filters = [] ) { // PhpMyAdmin configuration. $phpmyadmin['service_name'] = [ 'name' => 'phpmyadmin' ]; - $phpmyadmin['image'] = [ 'name' => 'easyengine/phpmyadmin:v' . EE_VERSION ]; + $phpmyadmin['image'] = [ 'name' => 'easyengine/phpmyadmin:' . $img_versions['easyengine/phpmyadmin'] ]; $phpmyadmin['restart'] = $restart_default; $phpmyadmin['environment'] = [ 'env' => [ @@ -125,7 +126,7 @@ public function generate_docker_compose_yml( array $filters = [] ) { // mailhog configuration. $mailhog['service_name'] = [ 'name' => 'mailhog' ]; - $mailhog['image'] = [ 'name' => 'easyengine/mailhog:v' . EE_VERSION ]; + $mailhog['image'] = [ 'name' => 'easyengine/mailhog:' . $img_versions['easyengine/mailhog'] ]; $mailhog['restart'] = $restart_default; $mailhog['command'] = [ 'name' => '["-invite-jim=false"]' ]; $mailhog['environment'] = [ @@ -144,7 +145,7 @@ public function generate_docker_compose_yml( array $filters = [] ) { // postfix configuration. $postfix['service_name'] = [ 'name' => 'postfix' ]; - $postfix['image'] = [ 'name' => 'easyengine/postfix:v' . EE_VERSION ]; + $postfix['image'] = [ 'name' => 'easyengine/postfix:' . $img_versions['easyengine/postfix'] ]; $postfix['hostname'] = [ 'name' => '${VIRTUAL_HOST}' ]; $postfix['restart'] = $restart_default; $postfix['labels'] = [ @@ -164,7 +165,7 @@ public function generate_docker_compose_yml( array $filters = [] ) { // redis configuration. $redis['service_name'] = [ 'name' => 'redis' ]; - $redis['image'] = [ 'name' => 'easyengine/redis:v' . EE_VERSION ]; + $redis['image'] = [ 'name' => 'easyengine/redis:' . $img_versions['easyengine/redis'] ]; $redis['labels'] = [ 'label' => [ 'name' => 'io.easyengine.site=${VIRTUAL_HOST}', From 60fa9515d565dc942265cd5eabdf960d15922455 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Fri, 10 Aug 2018 16:07:20 +0530 Subject: [PATCH 2/2] Remove version change in travis for docker-images Signed-off-by: Riddhesh Sanghvi --- ci/prepare.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/prepare.sh b/ci/prepare.sh index 330c525..c72cc7a 100755 --- a/ci/prepare.sh +++ b/ci/prepare.sh @@ -10,7 +10,6 @@ rm ee cd .. git clone https://github.com/EasyEngine/easyengine.git easyengine --depth=1 cd easyengine -echo 'travis_test' > VERSION # Copy tests to EE repo rm -r features