From 6015df24b3f8d3037e2fa195f60cc63fdd77cdd3 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 30 Jan 2018 17:34:20 +0100 Subject: [PATCH] Integrate CrisisCleanup with Postfix --- crisiscleanup.sh | 1 + crisiscleanup/etc/init.d/crisiscleanup | 3 ++- .../srv/crisiscleanup/conf/environments/production.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crisiscleanup.sh b/crisiscleanup.sh index 3023489..d971c0f 100755 --- a/crisiscleanup.sh +++ b/crisiscleanup.sh @@ -3,6 +3,7 @@ SOURCE_DIR=$(realpath $(dirname "${0}"))/crisiscleanup # Check prerequisites +docker image ls | grep -q postfix || $(realpath $(dirname "${0}"))/postfix.sh docker image ls | grep -q postgres || $(realpath $(dirname "${0}"))/postgres.sh # Build Docker container diff --git a/crisiscleanup/etc/init.d/crisiscleanup b/crisiscleanup/etc/init.d/crisiscleanup index 57c02c2..fe20a3e 100755 --- a/crisiscleanup/etc/init.d/crisiscleanup +++ b/crisiscleanup/etc/init.d/crisiscleanup @@ -4,7 +4,7 @@ description="Crisis Cleanup docker container" depend() { need docker net - use dns logger netmount + use dns logger netmount postfix after postgres } @@ -12,6 +12,7 @@ start() { /usr/bin/docker run -d --rm \ --name crisiscleanup \ -h crisiscleanup \ + --link postfix \ --link postgres \ -p 127.0.0.1:8005:8005 \ -v /srv/crisiscleanup/conf:/srv/crisiscleanup/config \ diff --git a/crisiscleanup/srv/crisiscleanup/conf/environments/production.rb b/crisiscleanup/srv/crisiscleanup/conf/environments/production.rb index 2153f30..907f55e 100644 --- a/crisiscleanup/srv/crisiscleanup/conf/environments/production.rb +++ b/crisiscleanup/srv/crisiscleanup/conf/environments/production.rb @@ -16,7 +16,7 @@ Rails.application.configure do config.consider_all_requests_local = false config.action_controller.perform_caching = true ActionMailer::Base.smtp_settings = { - :address => '127.0.0.1' + :address => 'postfix' } config.action_mailer.default_url_options = { :host => 'www.crisiscleanup.org',