Skip to content

Conversation

@sagarnasit
Copy link
Contributor

@sagarnasit sagarnasit commented Sep 20, 2018

Issue reference: EasyEngine/easyengine#1228

@sagarnasit sagarnasit self-assigned this Sep 20, 2018
@sagarnasit sagarnasit requested a review from mbtamuli September 20, 2018 12:11
@sagarnasit sagarnasit changed the title Move nginx-proxy check to service command WIP:Move nginx-proxy check to service command Sep 20, 2018
* Boots up the container if it is stopped or not running.
* @throws \EE\ExitException
*/
public static function nginx_proxy_check() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be more appropriate to move it onto a seperate util file like service-utils.php(To maintain consistency with other packages where functions which can be invoked by other packages are moved to a util file)

*
* @param Filesystem $fs Filesystem object to write file
*/
public static function generate_global_docker_compose_yml( Filesystem $fs ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this function is also invoked by above function, it should also be moved to util file

kirtangajjar
kirtangajjar previously approved these changes Sep 23, 2018
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
@mrrobot47 mrrobot47 changed the title WIP:Move nginx-proxy check to service command Move nginx-proxy check to service command Sep 25, 2018
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
@mbtamuli mbtamuli changed the title Move nginx-proxy check to service command Add global-services to service command Sep 25, 2018
],
],
[
'name' => 'elasticsearch',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove Elasticsearch

Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
mbtamuli
mbtamuli previously approved these changes Sep 25, 2018
}

$EE_CONF_ROOT = EE_CONF_ROOT;
if ( ! EE::docker()::docker_network_exists( GLOBAL_BACKEND_NETWORK ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you use two if conditions one after another instead of just using && ?

if (
 ! EE::docker()::docker_network_exists( GLOBAL_BACKEND_NETWORK ) &&
 ! EE::docker()::create_network( GLOBAL_BACKEND_NETWORK ) 
) { 

EE::error( 'Unable to create network ' . GLOBAL_BACKEND_NETWORK );
}
}
if ( ! EE::docker()::docker_network_exists( GLOBAL_FRONTEND_NETWORK ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same two if condition instead of just &&.

$container = 'ee-' . $service;
}
if ( ! EE::docker()::docker_network_exists( GLOBAL_BACKEND_NETWORK ) ) {
if ( ! EE::docker()::create_network( GLOBAL_BACKEND_NETWORK ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.. two if condition instead of just &&.

Copy link
Contributor

@mbtamuli mbtamuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker and config related changes look good to me.

@rahulsprajapati rahulsprajapati merged commit ce461f1 into EasyEngine:develop Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants