OSDN Git Service

adds the `fly_prune_workers_main` script.
[metasearch/grid-chef-repo.git] / cookbooks / concourse-ci / recipes / docker-compose.rb
index a4960cf..9a9a3ac 100644 (file)
@@ -202,7 +202,8 @@ unless oauth_client_secret_vault_item.empty?
 end
 
 external_url = web_envs_org['CONCOURSE_EXTERNAL_URL']
-web_envs['CONCOURSE_EXTERNAL_URL'] = "http://#{node['ipaddress']}:8080" if external_url.nil?
+external_url = "http://#{node['ipaddress']}:8080" if external_url.nil?
+web_envs['CONCOURSE_EXTERNAL_URL'] = external_url
 
 data_source = web_envs_org['CONCOURSE_POSTGRES_DATA_SOURCE']
 # for backward compatibility.
@@ -302,6 +303,17 @@ template config_file do
   mode '0600'
 end
 
+template "#{bin_dir}/fly_prune_workers_main" do
+  source 'opt/docker-compose/app/concourse/bin/fly_prune_workers_main'
+  owner 'root'
+  group 'root'
+  mode '0755'
+  action :create
+  variables(
+    external_url: external_url
+  )
+end
+
 log <<-"EOM"
 Note: You must execute the following command manually.
   See #{doc_url}