On Thu, Jan 14, 2021 at 02:05:58PM +0800, Cao Xueliang wrote:
On Thu, Jan 14, 2021 at 11:37:41AM +0800, Luan Shengde wrote:
add init redis host/port
Signed-off-by: Luan Shengde shdluan@163.com
container/send-internet-mail/send-internet-mail.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/container/send-internet-mail/send-internet-mail.rb b/container/send-internet-mail/send-internet-mail.rb index 8fdaa0d..6003028 100755 --- a/container/send-internet-mail/send-internet-mail.rb +++ b/container/send-internet-mail/send-internet-mail.rb @@ -6,7 +6,10 @@ require 'mail' require 'sinatra'
-require "#{ENV['CCI_SRC']}/lib/mail-post" +REDIS_HOST = %x(/sbin/ip route | awk '/default/ {print $3}').chomp
Why you don't get the REDIS_HOST from ENV like getting REDIS_PORT?
because in the the container, the redis host is 172.x.x.x,
Thanks, Luan Shengde
Thanks, Xueliang
+REDIS_PORT = ENV['REDIS_PORT']
+require_relative '../../lib/mail-post'
smtp = { address: 'smtp.qq.com', -- 2.23.0