Class: Dip::CLI::Nginx
- Inherits:
-
Thor
- Object
- Thor
- Dip::CLI::Nginx
- Defined in:
- lib/dip/cli/nginx.rb
Overview
See more github.com/bibendi/nginx-proxy
Instance Method Summary collapse
Instance Method Details
#down ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/dip/cli/nginx.rb', line 45 def down if [:help] invoke :help, ['down'] else Dip::Commands::Nginx::Down.new( name: .fetch(:name) ).execute end end |
#restart(*args) ⇒ Object
58 59 60 61 62 63 64 65 66 |
# File 'lib/dip/cli/nginx.rb', line 58 def restart(*args) if [:help] invoke :help, ['restart'] else Dip::CLI::Nginx.start(["down"] + args) sleep 1 Dip::CLI::Nginx.start(["up"] + args) end end |
#up ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/dip/cli/nginx.rb', line 25 def up if [:help] invoke :help, ['up'] else Dip::Commands::Nginx::Up.new( name: .fetch(:name), socket: .fetch(:socket), net: .fetch(:net), publish: .fetch(:publish), image: .fetch(:image), domain: .fetch(:domain) ).execute end end |