mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 07:43:43 +08:00
Merge pull request #1505 from crohr/debian-packaging-with-pkgr
Debian packaging with pkgr
This commit is contained in:
commit
90bc3323e1
2
Procfile
2
Procfile
|
@ -1,2 +1,2 @@
|
|||
web: bundle exec rails server -p $PORT
|
||||
sidekiq: bundle exec sidekiq -e $RAILS_ENV
|
||||
worker: bundle exec sidekiq -e $RAILS_ENV
|
|
@ -40,8 +40,27 @@ Discourse::Application.configure do
|
|||
# :authentication => 'plain',
|
||||
# :enable_starttls_auto => true }
|
||||
|
||||
config.action_mailer.delivery_method = :sendmail
|
||||
config.action_mailer.sendmail_settings = {arguments: '-i'}
|
||||
if ENV.key?('SMTP_URL')
|
||||
config.action_mailer.smtp_settings = begin
|
||||
uri = URI.parse(ENV['SMTP_URL'])
|
||||
params = {
|
||||
:address => uri.host,
|
||||
:port => uri.port,
|
||||
:domain => (uri.path || "").split("/")[1],
|
||||
:user_name => uri.user,
|
||||
:password => uri.password,
|
||||
:authentication => 'plain',
|
||||
:enable_starttls_auto => true
|
||||
}
|
||||
CGI.parse(uri.query || "").each {|k,v| params[k.to_sym] = v.first}
|
||||
params
|
||||
rescue
|
||||
raise "Invalid SMTP_URL"
|
||||
end
|
||||
else
|
||||
config.action_mailer.delivery_method = :sendmail
|
||||
config.action_mailer.sendmail_settings = {arguments: '-i'}
|
||||
end
|
||||
|
||||
# Send deprecation notices to registered listeners
|
||||
config.active_support.deprecation = :notify
|
||||
|
|
8
packaging/debian/setup.sh
Executable file
8
packaging/debian/setup.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
# This script installs the required example config files before buildpack compilation.
|
||||
|
||||
set -ex
|
||||
|
||||
cp config/database.yml.production-sample config/database.yml
|
||||
cp config/redis.yml.sample config/redis.yml
|
||||
cp config/environments/production.rb.sample config/environments/production.rb
|
Loading…
Reference in New Issue
Block a user