- git "/srv/#{year}.stateofthemap.org" do
- action :sync
- repository "https://github.com/openstreetmap/stateofthemap-#{year}.git"
- depth 1
- user "root"
- group "root"
- notifies :run, "bundle_install[/srv/#{year}.stateofthemap.org]"
- end
-
- directory "/srv/#{year}.stateofthemap.org/_site" do
- mode "755"
- owner "nobody"
- group "nogroup"
- end
-
- # FIXME: fix the the vendor directory permissions from prior root installs
- directory "/srv/#{year}.stateofthemap.org/vendor" do
- action :create
- recursive true
- owner "nobody"
- group "nogroup"
- end
-
- bundle_install "/srv/#{year}.stateofthemap.org" do
- action :nothing
- user "nobody"
- group "nogroup"
- environment "BUNDLE_FROZEN" => "true",
- "BUNDLE_WITHOUT" => "development:test",
- "BUNDLE_PATH" => "vendor/bundle",
- "BUNDLE_DEPLOYMENT" => "1",
- "BUNDLE_JOBS" => node.cpu_cores.to_s
- notifies :run, "bundle_exec[/srv/#{year}.stateofthemap.org]"
- only_if { ::File.exist?("/srv/#{year}.stateofthemap.org/Gemfile") }
- end