From e49ae56d271a26f2e54749af84972cf3af7313bc Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Mon, 14 Feb 2022 14:16:11 +0000 Subject: [PATCH] chore: replace procodile with foreman for dev --- Procfile => Procfile.dev | 0 Procfile.options | 12 ------------ bin/dev | 9 +++++++++ config/puma.rb | 2 +- 4 files changed, 10 insertions(+), 13 deletions(-) rename Procfile => Procfile.dev (100%) delete mode 100644 Procfile.options create mode 100755 bin/dev 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 bd62f960..00000000 --- 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 00000000..2daf7764 --- /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 4cb37479..d6425733 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -2,7 +2,7 @@ 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