mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 02:02:27 +00:00
* [#260] One click deploy to heroku * Added app.json file for Heroku deployment * Made changes in Procfile to accept the PORT as env variable * Added the one click button in README.md * Change readme and link * Alignment of button in Readme * Changing redis to free plan * Removed node-js build-pack * Changed the post-deploy script to be rake db:migrate * Removed web concurrency variable from app.json for heroku * Changed the link to chatwoot logo referenced in app.json * Changed postdeploy hook * Changed logo to be raw content from github * Changed the SMTP variables * Added optional conditional for sending mail * Changed the naming of SMTP variables * Having logo as base 64 encoded image for heroku deploy page * Fixed key not found error for SMTP variables * Correcting the specs for conversation assignment mailer * Spec rubocop fixes * Spec rubocop fixes * Added the link to master for heroku app.json
This commit is contained in:
@@ -3,11 +3,11 @@ FB_VERIFY_TOKEN=
|
|||||||
FB_APP_SECRET=
|
FB_APP_SECRET=
|
||||||
FB_APP_ID=
|
FB_APP_ID=
|
||||||
|
|
||||||
#ses
|
#mail
|
||||||
|
|
||||||
SES_ADDRESS=
|
SMTP_ADDRESS=
|
||||||
SES_USERNAME=
|
SMTP_USERNAME=
|
||||||
SES_PASSWORD=
|
SMTP_PASSWORD=
|
||||||
|
|
||||||
#misc
|
#misc
|
||||||
FRONTEND_URL=http://localhost:3000
|
FRONTEND_URL=http://localhost:3000
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
backend: bin/rails s -p 3000
|
backend: bin/rails s -p ${PORT:=3000}
|
||||||
frontend: bin/webpack-dev-server
|
frontend: bin/webpack-dev-server
|
||||||
@@ -30,6 +30,12 @@ Detailed documentation is available at [www.chatwoot.com/docs](https://www.chatw
|
|||||||
|
|
||||||
You can find the quick setup docs [here](https://www.chatwoot.com/docs/quick-setup).
|
You can find the quick setup docs [here](https://www.chatwoot.com/docs/quick-setup).
|
||||||
|
|
||||||
|
## Heroku one-click deploy
|
||||||
|
|
||||||
|
Deploying chatwoot to heroku, it's a breeze. It's as simple as clicking this button.
|
||||||
|
|
||||||
|
[](https://heroku.com/deploy?template=https://github.com/chatwoot/chatwoot/tree/master)
|
||||||
|
|
||||||
## Contributors ✨
|
## Contributors ✨
|
||||||
|
|
||||||
Thanks goes to all these [wonderful people](https://www.chatwoot.com/docs/contributors):
|
Thanks goes to all these [wonderful people](https://www.chatwoot.com/docs/contributors):
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ class AssignmentMailer < ApplicationMailer
|
|||||||
layout 'mailer'
|
layout 'mailer'
|
||||||
|
|
||||||
def conversation_assigned(conversation, agent)
|
def conversation_assigned(conversation, agent)
|
||||||
|
return if ENV.fetch('SMTP_ADDRESS', nil).blank?
|
||||||
|
|
||||||
@agent = agent
|
@agent = agent
|
||||||
@conversation = conversation
|
@conversation = conversation
|
||||||
mail(to: @agent.email, subject: "#{@agent.name}, A new conversation [ID - #{@conversation.display_id}] has been assigned to you.")
|
mail(to: @agent.email, subject: "#{@agent.name}, A new conversation [ID - #{@conversation.display_id}] has been assigned to you.")
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ Rails.application.configure do
|
|||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
config.action_mailer.default_url_options = { :host => ENV['FRONTEND_URL'] }
|
config.action_mailer.default_url_options = { :host => ENV['FRONTEND_URL'] }
|
||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = {
|
||||||
:address => ENV['SES_ADDRESS'],
|
:address => ENV['SMTP_ADDRESS'],
|
||||||
:port => 587,
|
:port => 587,
|
||||||
:user_name => ENV["SES_USERNAME"],
|
:user_name => ENV["SMTP_USERNAME"],
|
||||||
:password => ENV["SES_PASSWORD"],
|
:password => ENV["SMTP_PASSWORD"],
|
||||||
:authentication => :login,
|
:authentication => :login,
|
||||||
:enable_starttls_auto => true
|
:enable_starttls_auto => true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ Rails.application.configure do
|
|||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
config.action_mailer.default_url_options = { host: ENV['FRONTEND_URL'] }
|
config.action_mailer.default_url_options = { host: ENV['FRONTEND_URL'] }
|
||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = {
|
||||||
address: ENV['SES_ADDRESS'],
|
address: ENV['SMTP_ADDRESS'],
|
||||||
port: 587,
|
port: 587,
|
||||||
user_name: ENV['SES_USERNAME'], # Your SMTP user
|
user_name: ENV['SMTP_USERNAME'], # Your SMTP user
|
||||||
password: ENV['SES_PASSWORD'], # Your SMTP password
|
password: ENV['SMTP_PASSWORD'], # Your SMTP password
|
||||||
authentication: :login,
|
authentication: :login,
|
||||||
enable_starttls_auto: true
|
enable_starttls_auto: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
backend: ../bin/rails server -b 0.0.0.0 -p 3000
|
backend: ../bin/rails server -b 0.0.0.0 -p ${PORT:=3000}
|
||||||
frontend: ../bin/webpack-dev-server
|
frontend: ../bin/webpack-dev-server
|
||||||
@@ -67,7 +67,8 @@ RSpec.describe Conversation, type: :model do
|
|||||||
|
|
||||||
# send_email_notification_to_assignee
|
# send_email_notification_to_assignee
|
||||||
expect(AssignmentMailer).to have_received(:conversation_assigned).with(conversation, new_assignee)
|
expect(AssignmentMailer).to have_received(:conversation_assigned).with(conversation, new_assignee)
|
||||||
expect(assignment_mailer).to have_received(:deliver)
|
|
||||||
|
expect(assignment_mailer).to have_received(:deliver) if ENV.fetch('SMTP_ADDRESS', nil).present?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user