From df75bf5b1c24882c05db9ad432bc8ecd11161dee Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 22 Sep 2020 15:42:16 +0100 Subject: [PATCH 1/3] Add option for ui web path --- README.md | 2 ++ attributes/default.rb | 1 + recipes/binary.rb | 1 + templates/default/sv-mailhog-run.erb | 1 + 4 files changed, 5 insertions(+) diff --git a/README.md b/README.md index fa81fd3..44fa909 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ This cookbook contains the following attributes: | ['mailhog']['api']['port'] | Integer | 8025 | Port for HTTP API server to bind to | | ['mailhog']['ui']['ip'] | String | 0.0.0.0 | Interface for HTTP UI server to bind to | | ['mailhog']['ui']['port'] | Integer | 8025 | Port for HTTP UI server to bind to | +| ['mailhog']['ui']['web_path'] | String | '' | WebPath under which the ui is served (without leading or trailing slahes), e.g. 'mailhog' + | | ['mailhog']['cors-origin'] | String | nil | If set, a Access-Control-Allow-Origin header is returned for API endpoints | | ['mailhog']['hostname'] | String | mailhog.example | Hostname to use for EHLO/HELO and message IDs | | ['mailhog']['storage'] | String | memory | Set message storage: memory / mongodb / maildir | diff --git a/attributes/default.rb b/attributes/default.rb index 05275c9..f39bd58 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -47,6 +47,7 @@ default['mailhog']['api']['port'] = 8025 default['mailhog']['ui']['ip'] = '0.0.0.0' default['mailhog']['ui']['port'] = 8025 +default['mailhog']['ui']['web_path'] = '' default['mailhog']['cors-origin'] = nil default['mailhog']['hostname'] = 'mailhog.example' diff --git a/recipes/binary.rb b/recipes/binary.rb index 2f22c11..6c5b55e 100644 --- a/recipes/binary.rb +++ b/recipes/binary.rb @@ -52,6 +52,7 @@ :smtp_outgoing => node['mailhog']['smtp']['outgoing'], :ui_ip => node['mailhog']['ui']['ip'], :ui_port => node['mailhog']['ui']['port'], + :ui_web_path => node['mailhog']['ui']['web_path'], :api_ip => node['mailhog']['api']['ip'], :api_port => node['mailhog']['api']['port'], :cors_origin => node['mailhog']['cors-origin'], diff --git a/templates/default/sv-mailhog-run.erb b/templates/default/sv-mailhog-run.erb index 430e846..dd96c7e 100644 --- a/templates/default/sv-mailhog-run.erb +++ b/templates/default/sv-mailhog-run.erb @@ -4,6 +4,7 @@ exec /usr/bin/env MailHog \ -smtp-bind-addr=<%= @options[:smtp_ip] %>:<%= @options[:smtp_port] %> \ -outgoing-smtp=<%= @options[:smtp_outgoing] %> \ -ui-bind-addr=<%= @options[:ui_ip] %>:<%= @options[:ui_port] %> \ + -ui-web-path=<%= @options[:ui_web_path] %> \ -api-bind-addr=<%= @options[:api_ip] %>:<%= @options[:api_port] %> \ -cors-origin=<%= @options[:cors_origin] %> \ -hostname=<%= @options[:hostname] %> \ From 8cd5a1f3e6740bc9742dae96c84fd2c5f4a6f100 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 22 Sep 2020 15:44:10 +0100 Subject: [PATCH 2/3] Add option for ui web path --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 44fa909..b0299c0 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,7 @@ This cookbook contains the following attributes: | ['mailhog']['api']['port'] | Integer | 8025 | Port for HTTP API server to bind to | | ['mailhog']['ui']['ip'] | String | 0.0.0.0 | Interface for HTTP UI server to bind to | | ['mailhog']['ui']['port'] | Integer | 8025 | Port for HTTP UI server to bind to | -| ['mailhog']['ui']['web_path'] | String | '' | WebPath under which the ui is served (without leading or trailing slahes), e.g. 'mailhog' - | +| ['mailhog']['ui']['web_path'] | String | '' | WebPath under which the ui is served (without leading or trailing slahes), e.g. 'mailhog' | | ['mailhog']['cors-origin'] | String | nil | If set, a Access-Control-Allow-Origin header is returned for API endpoints | | ['mailhog']['hostname'] | String | mailhog.example | Hostname to use for EHLO/HELO and message IDs | | ['mailhog']['storage'] | String | memory | Set message storage: memory / mongodb / maildir | From 8b640be20fc438331b65a2009562a88886318727 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 22 Sep 2020 16:04:31 +0100 Subject: [PATCH 3/3] Increment version --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index aca7a17..976a1fb 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'r8@r8.com.ua' license 'MIT' description 'Installs/Configures mailhog' -version '0.2.0' +version '0.2.1' depends 'runit', '= 1.7.4'