diff --git a/Procfile b/Procfile.dev similarity index 100% rename from Procfile rename to Procfile.dev diff --git a/Procfile.options b/Procfile.options deleted file mode 100644 index bd62f96..0000000 --- a/Procfile.options +++ /dev/null @@ -1,12 +0,0 @@ -app_name: Postal -log_path: /tmp/postal/procodile.log -pid_root: /tmp/postal/pids -processes: - web: - restart_mode: usr1 - smtp: - restart_mode: usr1 - worker: - restart_mode: start-term - cron: - restart_mode: term-start diff --git a/bin/dev b/bin/dev new file mode 100755 index 0000000..2daf776 --- /dev/null +++ b/bin/dev @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if ! command -v foreman &> /dev/null +then + echo "Installing foreman..." + gem install foreman +fi + +foreman start -f Procfile.dev diff --git a/config/puma.rb b/config/puma.rb index 4cb3747..d642573 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -2,7 +2,7 @@ require_relative '../lib/postal/config' threads_count = Postal.config.web_server&.max_threads&.to_i || 5 threads threads_count, threads_count bind_address = Postal.config.web_server&.bind_address || '127.0.0.1' -bind_port = ENV['PORT'] || Postal.config.web_server&.port&.to_i || 5000 +bind_port = Postal.config.web_server&.port&.to_i || ENV['PORT'] || 5000 bind "tcp://#{bind_address}:#{bind_port}" environment Postal.config.rails&.environment || 'development' prune_bundler