Skip to content

Instantly share code, notes, and snippets.

@EugenMayer
Created August 20, 2016 16:38
Show Gist options
  • Save EugenMayer/b0f49c99d28e66f3e4179c967540faa2 to your computer and use it in GitHub Desktop.
Save EugenMayer/b0f49c99d28e66f3e4179c967540faa2 to your computer and use it in GitHub Desktop.
require 'docker-compose'
threads = []
project_paths = %w(/project/path1 /project/path2 /project/path3 /project/path)
project_paths.each do |path|
threads.push Docker::Compose::Session.new(dir:compose_base_path1)
end
begin
threads.each do |thread|
thread.join
end
rescue SystemExit, Interrupt
threads.each do |thread|
thread.kill
end
rescue Exception => e
handle_exception e
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment