From: Grant Date: Sun, 16 Feb 2020 01:06:20 +0000 (+0000) Subject: Merge pull request #269 from Firefishy/blogs-use-bundle-deployment X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/6b53a39192a887931550a01f9846fa7bdbd621e7?hp=aa1f2db64d874f4dd47ebeed427ca44c87947a5b Merge pull request #269 from Firefishy/blogs-use-bundle-deployment blogs: use bundle install deployment over global --- diff --git a/cookbooks/blogs/recipes/default.rb b/cookbooks/blogs/recipes/default.rb index 6432a98d3..49e52cb57 100644 --- a/cookbooks/blogs/recipes/default.rb +++ b/cookbooks/blogs/recipes/default.rb @@ -43,6 +43,7 @@ end git "/srv/blogs.openstreetmap.org" do action :sync repository "git://github.com/gravitystorm/blogs.osm.org.git" + depth 5 user "blogs" group "blogs" notifies :run, "execute[/srv/blogs.openstreetmap.org/Gemfile]", :immediately @@ -50,16 +51,16 @@ end execute "/srv/blogs.openstreetmap.org/Gemfile" do action :nothing - command "bundle install" + command "bundle install --deployment" cwd "/srv/blogs.openstreetmap.org" - user "root" - group "root" + user "blogs" + group "blogs" notifies :run, "execute[/srv/blogs.openstreetmap.org]", :immediately end execute "/srv/blogs.openstreetmap.org" do action :nothing - command "bundle exec /usr/local/bin/pluto build -t osm -o build" + command "bundle exec pluto build -t osm -o build" cwd "/srv/blogs.openstreetmap.org" user "blogs" group "blogs" diff --git a/cookbooks/blogs/templates/default/cron.erb b/cookbooks/blogs/templates/default/cron.erb index c2d6dfb16..fe4ef2a0e 100644 --- a/cookbooks/blogs/templates/default/cron.erb +++ b/cookbooks/blogs/templates/default/cron.erb @@ -2,4 +2,4 @@ MAILTO=admins@openstreetmap.org -*/30 * * * * blogs cd /srv/blogs.openstreetmap.org; bundle exec /usr/local/bin/pluto --quieter --config=/srv/blogs.openstreetmap.org build --dbpath=/srv/blogs.openstreetmap.org --template=osm --output=/srv/blogs.openstreetmap.org/build /srv/blogs.openstreetmap.org/planet.ini > /dev/null +*/30 * * * * blogs cd /srv/blogs.openstreetmap.org; bundle exec pluto --quieter --config=/srv/blogs.openstreetmap.org build --dbpath=/srv/blogs.openstreetmap.org --template=osm --output=/srv/blogs.openstreetmap.org/build /srv/blogs.openstreetmap.org/planet.ini > /dev/null