sameersbn / sameersbn/docker-gitlab

No Mails

Open
#1,059 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

wontfix
Dominant language
Shell
Stars
8.1k
Forks
2.1k
Avg merge
17h 47m
Merged PRs (30d)
7

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the docker run environment variables and mounted /etc/gitlab, then run gitlab-ctl status and gitlab-rake gitlab:check inside the container rather than on the host. Check the reported production.log and config/database.yml paths while tracing the SMTP settings; done means the container services run and test mail is delivered.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.