lib/neptuno/docker/restart.rb in neptuno-1.0.10 vs lib/neptuno/docker/restart.rb in neptuno-1.2.0
- old
+ new
@@ -2,21 +2,21 @@
module Neptuno
module Docker
# Restart docker containers for Neptuno project
class Restart < Neptuno::CLI::Base
- desc 'Docker: Rebuild and restart docker containers for current project'
+ desc "Docker: Rebuild and restart docker containers for current project"
- option :all, type: :boolean, default: false, desc: 'Run on all services'
- argument :services, type: :array, required: false, desc: 'Optional list of services'
+ option :all, type: :boolean, default: false, desc: "Run on all services"
+ argument :services, type: :array, required: false, desc: "Optional list of services"
def call(services: [], **options)
- command_services_to('restart', all: options.fetch(:all), services_as_args: services) do |services|
+ command_services_to("restart", all: options.fetch(:all), services_as_args: services) do |services|
make_service_files(services)
- system("cd #{neptuno_path} && docker compose stop -t 0 #{services.join(' ')}")
- system("cd #{neptuno_path} && docker compose rm -f #{services.join(' ')}")
- system("cd #{neptuno_path} && docker compose build #{services.join(' ')}")
- system("cd #{neptuno_path} && docker compose up -d #{services.join(' ')}")
+ system("cd #{neptuno_path} && docker compose stop -t 0 #{services.join(" ")}")
+ system("cd #{neptuno_path} && docker compose rm -f #{services.join(" ")}")
+ system("cd #{neptuno_path} && docker compose build #{services.join(" ")}")
+ system("cd #{neptuno_path} && docker compose up -d #{services.join(" ")}")
end
end
end
end
end