lib/harbr/job.rb in harbr-0.0.60 vs lib/harbr/job.rb in harbr-0.0.61
- old
+ new
@@ -41,15 +41,18 @@
end
def create_run_script(container_name, port)
service_dir = "/etc/sv/harbr/#{container_name}"
+
+ TODO:: pull the run script from current run
+
script_template = <<~SCRIPT
#!/bin/sh
exec 2>&1
cd /var/harbr/#{container_name}/current
- exec bundle exec puma -p #{port}
+ exec ./exe/run #{port}
SCRIPT
service_dir = "/etc/sv/harbr/#{container_name}"
FileUtils.mkdir_p(service_dir)
@@ -58,10 +61,10 @@
puts "Run script created and made executable for container: #{container_name}"
end
def create_log_script(container_name)
log_dir = "/var/log/harbr/#{container_name}"
-
+
FileUtils.mkdir_p(log_dir)
script_template = <<~SCRIPT
#!/bin/sh
exec svlogd -tt #{log_dir}/