Add development section to doc.
This commit is contained in:
parent
69708dab9f
commit
50baa1fdd1
2 changed files with 28 additions and 4 deletions
|
@ -87,13 +87,13 @@ In this example, we'll use the Gmail address `gitlab-replies@gmail.com`. If you'
|
||||||
mail_room_enabled=true
|
mail_room_enabled=true
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Restart GitLab
|
6. Restart GitLab:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo service gitlab restart
|
sudo service gitlab restart
|
||||||
```
|
```
|
||||||
|
|
||||||
7. Check if everything is configured correctly
|
7. Check if everything is configured correctly:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo bundle exec rake gitlab:reply_by_email:check RAILS_ENV=production
|
sudo bundle exec rake gitlab:reply_by_email:check RAILS_ENV=production
|
||||||
|
|
|
@ -589,8 +589,13 @@ namespace :gitlab do
|
||||||
check_address_formatted_correctly
|
check_address_formatted_correctly
|
||||||
check_mail_room_config_exists
|
check_mail_room_config_exists
|
||||||
check_imap_authentication
|
check_imap_authentication
|
||||||
check_initd_configured_correctly
|
|
||||||
check_mail_room_running
|
if Rails.env.production?
|
||||||
|
check_initd_configured_correctly
|
||||||
|
check_mail_room_running
|
||||||
|
else
|
||||||
|
check_foreman_configured_correctly
|
||||||
|
end
|
||||||
else
|
else
|
||||||
puts 'Reply by email is disabled in config/gitlab.yml'
|
puts 'Reply by email is disabled in config/gitlab.yml'
|
||||||
end
|
end
|
||||||
|
@ -635,6 +640,25 @@ namespace :gitlab do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check_foreman_configured_correctly
|
||||||
|
print "Foreman configured correctly? ... "
|
||||||
|
|
||||||
|
path = Rails.root.join("Procfile")
|
||||||
|
|
||||||
|
if File.exist?(path) && File.read(path) =~ /mail_room:/
|
||||||
|
puts "yes".green
|
||||||
|
else
|
||||||
|
puts "no".red
|
||||||
|
try_fixing_it(
|
||||||
|
"Enable mail_room in your Procfile."
|
||||||
|
)
|
||||||
|
for_more_information(
|
||||||
|
"doc/reply_by_email/README.md"
|
||||||
|
)
|
||||||
|
fix_and_rerun
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def check_mail_room_running
|
def check_mail_room_running
|
||||||
print "MailRoom running? ... "
|
print "MailRoom running? ... "
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue