can not run gitlab with docker-compose
Summary
can not run gitlab with docker-compose
/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory
...
failed to load command: unicorn (/opt/gitlab/embedded/bin/unicorn)
unicorn not started
Steps to reproduce
my docker-compose.yml:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitLab'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.local'
ports:
- '80:80'
- '443:443'
- '22:22'
volumes:
- ./dockerfiles/gitlab/config:/etc/gitlab
- ./dockerfiles/gitlab/logs:/var/log/gitlab
- ./dockerfiles/gitlab/data:/var/opt/gitlab
What is the current bug behavior?
stdout:
web_1 | ==> /var/log/gitlab/gitlab-rails/production_json.log <==
web_1 | {"method":"GET","path":"/","format":"html","controller":"RootController","action":"index","status":302,"duration":14.6,"view":0.0,"db":0.0,"location":"http://example.org/users/sign_in","time":"2018-04-20T13:13:22.441Z","params":[],"remote_ip":null,"user_id":null,"username":null}
web_1 |
web_1 | ==> /var/log/gitlab/unicorn/current <==
web_1 | 2018-04-20_13:13:22.52747 master failed to start, check stderr log for details
web_1 |
web_1 | ==> /var/log/gitlab/unicorn/unicorn_stderr.log <==
web_1 | I, [2018-04-20T13:13:22.458523 #3168] INFO -- : listening on addr=127.0.0.1:8080 fd=18
web_1 | F, [2018-04-20T13:13:22.460439 #3168] FATAL -- : error adding listener addr=/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket
web_1 | Errno::ENAMETOOLONG: File name too long - connect(2) for /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/socket_helper.rb:122:in `initialize'
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/socket_helper.rb:122:in `new'
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/socket_helper.rb:122:in `bind_listen'
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:231:in `listen'
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:808:in `block in bind_new_listeners!'
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:808:in `each'
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:808:in `bind_new_listeners!'
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:130:in `start'
web_1 | /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/unicorn-5.1.0/bin/unicorn:126:in `<top (required)>'
web_1 | /opt/gitlab/embedded/bin/unicorn:23:in `load'
web_1 | /opt/gitlab/embedded/bin/unicorn:23:in `<top (required)>'
web_1 |
web_1 | ==> /var/log/gitlab/unicorn/unicorn_stdout.log <==
web_1 | bundler: failed to load command: unicorn (/opt/gitlab/embedded/bin/unicorn)
web_1 |
web_1 | ==> /var/log/gitlab/unicorn/current <==
web_1 | 2018-04-20_13:13:23.54424 failed to start a new unicorn master
web_1 | 2018-04-20_13:13:23.56094 starting new unicorn master
web_1 |
web_1 | ==> /var/log/gitlab/unicorn/unicorn_stderr.log <==
web_1 | I, [2018-04-20T13:13:24.753453 #3211] INFO -- : Refreshing Gem list
web_1 |
web_1 | ==> /var/log/gitlab/gitlab-workhorse/current <==
web_1 | 2018-04-20_13:13:33.64291 time="2018-04-20T13:13:33Z" level=error msg=error error="badgateway: failed after 0s: dial unix /var/opt/gitlab/gitlab-rails/sockets/gitlab.socket: connect: no such file or directory" method=GET uri=/help
web_1 | 2018-04-20_13:13:33.64323 localhost @ - - [2018/04/20:13:13:33 +0000] "GET /help HTTP/1.1" 502 2916 "" "curl/7.56.1" 0.003
What is the expected correct behavior?
response 200
Details of package version
image: 'gitlab/gitlab-ce:latest'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=========================================-=========================-=========================-========================================================================================
ii gitlab-ce 10.6.4-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, Redis)
un gitlab-ee <none> <none> (no description available)
Environment details
Docker 18.03.0-ce-mac60
- Resources (in docker conf)
- CPU: 2 core
- Memory total: 4gb
Configuration details
only
nginx['redirect_http_to_https'] = true
Edited by Artem Ulko