Skip to content

Commit 5f08e95

Browse files
author
jtimberman
committed
cook-18, cleaning up django and web_app define, will document web_app functionality under apache2 module.
1 parent a4d5ab0 commit 5f08e95

5 files changed

Lines changed: 9 additions & 81 deletions

File tree

‎apache2/definitions/web_app.rb‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
# limitations under the License.
1818
#
1919

20-
21-
22-
define :web_app, :docroot => nil, :canonical_hostname => false, :template => "web_app.conf.erb", :app_type => nil, :variables => nil do
20+
define :web_app, :docroot => nil, :canonical_hostname => nil, :template => nil do
2321

2422
application_name = params[:name]
2523

@@ -28,12 +26,16 @@
2826
include_recipe "apache2::mod_deflate"
2927
include_recipe "apache2::mod_headers"
3028

31-
template "#{node[:apache][:dir]}/sites-available/#{application_name}" do
32-
source :template
29+
template "#{node[:apache][:dir]}/sites-available/#{application_name}.conf" do
30+
source params[:template]
3331
owner "root"
3432
group "root"
3533
mode 0644
36-
variables :variables
34+
variables(
35+
:docroot => params[:docroot],
36+
:canonical_hostname => params[:canonical_hostname],
37+
:application_name => application_name
38+
)
3739
notifies :reload, resources(:service => "apache2"), :delayed
3840
end
3941

‎apache2/recipes/default.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
when "debian","ubuntu"
3535
name "apache2"
3636
end
37-
supports :restart => true
37+
supports :restart => true, :reload => true
3838
action :enable
3939
end
4040

‎apache2/templates/default/web_app.conf.erb‎

Lines changed: 0 additions & 63 deletions
This file was deleted.

‎django/recipes/default.rb‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,3 @@
2727
package "python-django" do
2828
action :install
2929
end
30-
31-
# To create a django web app configuration, in a site-cookbook:
32-
# create attributes file with
33-
# node[:django_app][:path]
34-
# node[:django_app][:python_path_extra]
35-
36-
# in the recipe, create the web app resource. don't forget the template:
37-
# web_app "app_name" do
38-
# docroot "/srv/app_name"
39-
# template "app_name.conf.erb"
40-
# end

‎django/templates/default/django.conf.erb‎

Whitespace-only changes.

0 commit comments

Comments
 (0)