Quellcode durchsuchen

Arreglo de comentarios

Se agrego un docker-compose rebuild
gabriel vor 7 Jahren
Ursprung
Commit
9c69375af4
2 geänderte Dateien mit 22 neuen und 10 gelöschten Zeilen
  1. 1 1
      README.md
  2. 21 9
      tools/src/UpdateFlowdatModulesCommand.php

+ 1 - 1
README.md

@@ -37,7 +37,7 @@ Cada vez que se genere un módulo nuevo se debe agregar la dirección del reposi
      Para conectarme al servidor y lanzar el dind puedo ejecutar la siguiente sentencia:
          ssh root@base.fd3.flowdat.com -t "docker run -it -v /opt/:/opt/ -v /var/run/docker.sock:/tmp/docker.sock dind bash"
      Cambiar los permisos de la key para conectarse a bitbucket:
-         chmod 600 /op/flowdat/keys/bitbucket.id_rsa
+         chmod 600 /opt/flowdat/keys/bitbucket.id_rsa
      Agregar la key al ssh-agent:
          eval $(ssh-agent); ssh-add /opt/flowdat/keys/bitbucket.id_rsa
      Ahora debo actualizar el installer con el siguiente comando (ver las opciones con --help):

+ 21 - 9
tools/src/UpdateFlowdatModulesCommand.php

@@ -55,24 +55,36 @@ class UpdateFlowdatModulesCommand extends Command
                 $output->writeln('-------------------------------------------------------------------------------------');    
 	        $output->writeln('Module: ' . $sec);    
 	        if ($tag) {
-                    $command = 'cd  ' . $sec . ' && git stash && git checkout -B ' . $versionOnly . ' && git fetch ' . $remote . 
+                    $command = 'cd ' . $sec . ' && git stash && git checkout -B ' . $versionOnly . ' && git fetch ' . $remote . 
 	                       ' ' . $versionOnly . ':refs/tags/' . $versionOnly . ' && git merge -X theirs ' . $version;    
                 } else {
-                    $command = 'cd  ' . $sec . ' && git stash && git checkout -B ' . $versionOnly . ' && git fetch ' . $remote . ' ' . $version;
+                    $command = 'cd ' . $sec . ' && git stash && git checkout -B ' . $versionOnly . ' && git fetch ' . $remote . ' ' . $version;
                 }
                 $output->writeln("\tComando: " . $command);  
                 $resp = shell_exec ($command);
-	        $output->writeln($resp);
-                if (count($conf) > 0) {
-	            $command = "docker-compose exec " . $sec . " composer install";
-                    $output->writeln("\tComando: " . $command);  
-                    $resp = shell_exec ($command);
-	            $output->writeln($resp);
-		}
+		$output->writeln($resp);
+		// se reemplaza por docker-compose up --force-recreate
+                //if (count($conf) > 0) {
+	        //    $command = "docker-compose exec " . $sec . " bin/composer-install.sh";
+                //    $output->writeln("\tComando: " . $command);  
+                //    $resp = shell_exec ($command);
+	        //    $output->writeln($resp);
+		//}
 	    } catch (\Throwable $t) {
 		$error .= $t->getTraceAsString() . "\n";
             }  
 	}
+
+	$command = "docker-compose up -d --force-recreate";
+        $output->writeln("\tComando: " . $command);  
+        $resp = shell_exec ($command);
+	$output->writeln($resp);
+        
+	sleep(600);
+	$command = "docker-compose stop nginx; sleep 20; docker-compose up -d --force-recreate nginx";
+	$output->writeln("\tComando: " . $command);
+	shell_exec ($command);
+
 	if (strlen($error) > 0) {
             $output->writeln("SE PRODUJERON LOS SIGUIENTES ERRORES: \n" . $error);
 	    /**