diff --git a/stack/builder b/stack/builder index 7375c0d..249ddbc 100755 --- a/stack/builder +++ b/stack/builder @@ -82,12 +82,26 @@ cat > /start < /dev/null + sleep 1 +} +trap onexit SIGTERM + cd $app_root if [[ -f Procfile ]]; then - ruby -e "require 'yaml';puts YAML.load_file('Procfile')['\$1']" | bash + \`ruby -e "require 'yaml';puts YAML.load_file('Procfile')['\$1']"\` & else - ruby -e "require 'yaml';puts (YAML.load_file('.release')['default_process_types'] || {})['\$1']" | bash + \`ruby -e "require 'yaml';puts (YAML.load_file('.release')['default_process_types'] || {})['\$1']"\` & fi +wait + EOF chmod +x /start