class Dip::CLI::Nginx

See more github.com/bibendi/nginx-proxy

Public Instance Methods

down() click to toggle source
# File lib/dip/cli/nginx.rb, line 48
def down
  if options[:help]
    invoke :help, ["down"]
  else
    Dip::Commands::Nginx::Down.new(
      name: options.fetch(:name)
    ).execute
  end
end
restart(*args) click to toggle source
# File lib/dip/cli/nginx.rb, line 61
def restart(*args)
  if options[:help]
    invoke :help, ["restart"]
  else
    Dip::CLI::Nginx.start(["down"] + args)
    sleep 1
    Dip::CLI::Nginx.start(["up"] + args)
  end
end
up() click to toggle source
# File lib/dip/cli/nginx.rb, line 27
def up
  if options[:help]
    invoke :help, ["up"]
  else
    Dip::Commands::Nginx::Up.new(
      name: options.fetch(:name),
      socket: options.fetch(:socket),
      net: options.fetch(:net),
      publish: options.fetch(:publish),
      image: options.fetch(:image),
      domain: options.fetch(:domain),
      certs: options[:certs]
    ).execute
  end
end