Class: Dolphin::Nginx
- Inherits:
-
Base
- Object
- Thor
- Base
- Dolphin::Nginx
show all
- Defined in:
- lib/dolphin/nginx.rb
Overview
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Constructor Details
This class inherits a constructor from Dolphin::Base
Instance Method Details
#conf ⇒ Object
23
24
25
26
27
28
29
30
31
|
# File 'lib/dolphin/nginx.rb', line 23
def conf
= [
"
sudo ln -sf #{@deploy_dir}/config/nginx/#{@application}.conf /etc/nginx/conf.d/#{@application}.conf
",
]
execute
end
|
#install ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/dolphin/nginx.rb', line 5
def install
= [
"
# set repo
sudo cp ~/nginx.repo /etc/yum.repos.d/
# list repos
# yum repolist
# install nginx
sudo yum -y install nginx
",
]
execute
end
|
#restart ⇒ Object
58
59
60
61
62
63
64
65
66
67
|
# File 'lib/dolphin/nginx.rb', line 58
def restart
= [
"
# common settings
sudo service nginx restart
",
]
execute
end
|
#start ⇒ Object
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/dolphin/nginx.rb', line 34
def start
= [
"
# common settings
sudo service nginx start
",
]
execute
end
|
#stop ⇒ Object
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/dolphin/nginx.rb', line 46
def stop
= [
"
# common settings
sudo service nginx stop
",
]
execute
end
|