Skip to content

Commit

Permalink
Add minimum 5GB disk requirement for update
Browse files Browse the repository at this point in the history
Signed-off-by: Riddhesh Sanghvi <[email protected]>
  • Loading branch information
mrrobot47 committed Aug 8, 2024
1 parent a946ec3 commit ea9b415
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions php/EE/Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ public function check_requirements( $show_error = true ) {
*/
private function migrate() {

// Check if minimum 5GB disk space is available
$free_space = disk_free_space( EE_ROOT_DIR );
$docker_dir = EE::launch( 'docker info --format \'{{.DockerRootDir}}\'' )->stdout;
$free_space_docker = disk_free_space( $docker_dir );

if ( $free_space < 5 * 1024 * 1024 * 1024 || $free_space_docker < 5 * 1024 * 1024 * 1024 ) {
EE::error( 'EasyEngine update requires minimum 5GB disk space to run. Please free up some space and try again.' );
}

$rsp = new \EE\RevertableStepProcessor();

$rsp->add_step( 'ee-db-migrations', 'EE\Migration\Executor::execute_migrations' );
Expand Down

0 comments on commit ea9b415

Please sign in to comment.