Class: Dolphin::Nginx
- Inherits:
-
Base
- Object
- Thor
- Base
- Dolphin::Nginx
show all
- Defined in:
- lib/dolphin.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
166
167
168
169
170
171
172
173
174
|
# File 'lib/dolphin.rb', line 166
def conf
= [
"
sudo ln -sf #{@deploy_dir}/config/nginx/#{@application}.conf /etc/nginx/conf.d/#{@application}.conf
",
]
execute
end
|
#install ⇒ Object
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
# File 'lib/dolphin.rb', line 148
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
201
202
203
204
205
206
207
208
209
210
|
# File 'lib/dolphin.rb', line 201
def restart
= [
"
# common settings
sudo service nginx restart
",
]
execute
end
|
#start ⇒ Object
177
178
179
180
181
182
183
184
185
186
|
# File 'lib/dolphin.rb', line 177
def start
= [
"
# common settings
sudo service nginx start
",
]
execute
end
|
#stop ⇒ Object
189
190
191
192
193
194
195
196
197
198
|
# File 'lib/dolphin.rb', line 189
def stop
= [
"
# common settings
sudo service nginx stop
",
]
execute
end
|