小编Ope*_*acy的帖子

在traefik代理后面的docker中的gitlab失败(通常)

我有几个网站在Docker中运行LetsEncrypt凭据并通过traefik路由.我想在Docker中运行一个本地gitlab-ce,类似于LetsEncrypt和traefik.

所以我把它添加到我的traefik.toml文件中:

[[acme.domains]]
  main = "gitlab.mydomain.com"
Run Code Online (Sandbox Code Playgroud)

这到config/gitlab.rb:

external_url "http://gitlab.mydomain.com"
Run Code Online (Sandbox Code Playgroud)

我开始使用gitlab:

docker run -d --restart=always \
     --hostname gitlab.mydomain.com \
     --expose 80 \
     --volume /srv/gitlab/config:/etc/gitlab \
     --volume /srv/gitlab/data:/var/opt/gitlab \
     --volume /var/log/gitlab:/var/log/gitlab \
     --label traefik.frontend.rule=Host:gitlab.mydomain.com \
     --name gitlab gitlab/gitlab-ce:latest
Run Code Online (Sandbox Code Playgroud)

转到https://gitlab.mydomain.com/我得到一个带有LetsEncrypt生成证书的安全站点,但该站点未加载:

内部服务器错误

当我重新加载页面时,我看到docker logs gitlab -f:

==> /var/log/gitlab/sshd/current <==
2017-02-12_16:51:31.00446 Bad protocol version identification 'GET / HTTP/1.1' from 172.17.0.8 port 41138
2017-02-12_16:51:31.26238 Bad protocol version identification 'GET /favicon.ico HTTP/1.1' from 172.17.0.8 port 41140
Run Code Online (Sandbox Code Playgroud)

/error/i在日志中搜索我看到可能有问题的几件事(zruby/gems/2.3.0/gems/redis-3.2.2z中报告了很多错误)但没有"吸烟枪"AFAICT.

为了docker restart gitlab弥补疯狂,大约每十个左右(随机)时间,我运行的网站就完美了.我一直想把它留下来,但其中却是疯狂...... …

docker gitlab-omnibus traefik

6
推荐指数
2
解决办法
3902
查看次数

标签 统计

docker ×1

gitlab-omnibus ×1

traefik ×1