sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.9k stars 2.14k forks source link

No Mails #1059

Open wokadeh opened 7 years ago

wokadeh commented 7 years ago

Hello,

first I would like to thank for this great project. I have a problem, though, after using this Gitlab setup with external volumes. When I used it without everything was working perfectly.

The problem is that I don't get any e-mails sent. First I thought naive everything would be installed automatically but then I saw that you need to use your own SMTP server.

So there is my setup that won’t work for my e-mail system. Some entries are redundant because I didn’t know which one I really need.

I would be really happy about your help!

docker run \
--name gitlabN_app \
--hostname myHost.com \
--link gitlabN-postgresql:postgresql \
--link gitlabN-redis:redisio \
--publish 2289:22 \
--publish 8929:80 \
-e 'GITLAB_RELATIVE_URL_ROOT=/git' \
-e 'VIRTUAL_HOST=myHost.com/git' \
-e 'PROXY_SUBDIR=/git' \
-e 'GITLAB_PORT=8929' \
-e 'GITLAB_SSH_PORT=2289' \
-e 'GITLAB_EMAIL_ENABLED=true‘ \
-e 'GITLAB_ROOT_EMAIL=mail@myHost.com‘ \
-e 'GITLAB_ROOT_PASSWORD= xxxxxxxxxxxxxxx‚ \
-e 'GITLAB_EMAIL=mail@myHost.com’ \
-e 'GITLAB_EMAIL_DISPLAY_NAME=Gitlab DIVA’ \
-e 'SMTP_HOST=smtp.myHost.com’ \
-e 'SMTP_USER=user’ \
-e 'SMTP_PASS= xxxxxxxxxxxxxxx’ \
-e 'GITLAB_SECRETS_DB_KEY_BASE=xxxxxxxxxxxxxxx‘ \
-e 'GITLAB_SECRETS_OTP_KEY_BASE= xxxxxxxxxxxxxxx' \
-e 'GITLAB_SECRETS_SECRET_KEY_BASE= xxxxxxxxxxxxxxx' \
--volume ${HOST_PATH}/data:/var/opt/gitlab \
--volume ${HOST_PATH}/log:/var/log/gitlab \
--volume ${HOST_PATH}/config:/etc/gitlab \
sameersbn/gitlab:latest

Something else I don’t understand. When I connect to the running docker container I cannot access gitlab-ctl there, but in the main system. I only get errors then asking for the status:

service@ubuntu-git:~$ sudo gitlab-ctl status
fail: gitlab-workhorse: runsv not running
fail: logrotate: runsv not running
fail: postgresql: runsv not running
fail: redis: runsv not running
fail: sidekiq: runsv not running
fail: unicorn: runsv not running
service@ubuntu-git:$ sudo gitlab-rake gitlab:check
[sudo] password for service: 
Rails Error: Unable to access log file. Please ensure that /opt/gitlab/embedded/service/gitlab-rails/log/production.log exists and is writable (ie, make it writable for user and group: chmod 0664 /opt/gitlab/embedded/service/gitlab-rails/log/production.log). The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
** [Raven] Raven 0.15.6 configured not to send errors.
rake aborted!
Cannot load `Rails.application.database_configuration`:
Could not load database configuration. No such file - ["config/database.yml"]
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/configuration.rb:110:in `database_configuration'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:Railtie>'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `each'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:116:in `block in <class:Railtie>'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:5:in `<top (required)>'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Could not load database configuration. No such file - ["config/database.yml"]
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/configuration.rb:110:in `database_configuration'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:Railtie>'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `each'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:116:in `block in <class:Railtie>'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:5:in `<top (required)>'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!'
/opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => gitlab:check => gitlab:gitlab_shell:check => environment
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.