GitLab LFS за nginx proxy + файл уже закрыт - PullRequest
0 голосов
/ 30 января 2019

Я использую GitLab ce (self hosted) в контейнере Docker.Все мои контейнеры проксируются прокси-сервером nginx ( также docker ).Я также использую контейнер letsencrypt для обработки моих ssl-сертификатов.Everythink работает нормально (git fetch / pull / push, веб-интерфейс GitLab, SSL-сертификаты и т. Д.), Если я не запускаю "git lfs install && git lfs track" * .iso ". Когда я нажимаю какие-либо файлы, я уже получаю файл ошибки"закрыто ".

Мои конфиги:

nginx-proxy.yml:

version: '3'

services:

  proxy:
    image: jwilder/nginx-proxy:alpine
    labels:
      - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
    container_name: proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - ./volumes/proxy/conf.d:/etc/nginx/conf.d:rw
      - ./volumes/proxy/vhost.d:/etc/nginx/vhost.d:rw
      - ./volumes/proxy/html:/usr/share/nginx/html:rw
      - ./volumes/proxy/certs:/etc/nginx/certs:ro
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    restart: unless-stopped

  letsencrypt:
    image: jrcs/letsencrypt-nginx-proxy-companion
    container_name: letsencrypt
    depends_on:
      - proxy
    volumes:
      - ./volumes/proxy/certs:/etc/nginx/certs:rw
      - ./volumes/proxy/vhost.d:/etc/nginx/vhost.d:rw
      - ./volumes/proxy/html:/usr/share/nginx/html:rw
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    restart: unless-stopped

networks:
  default:
    external:
      name: proxy_net

gitlab.yml

version: '2'

services:
        gitlab:
                restart: always
                hostname: git
                domainname: domain.com
                image: gitlab/gitlab-ce:latest
                volumes:
                        - ./volumes/config:/etc/gitlab
                        - ./volumes/logs:/var/log/gitlab
                        - ./volumes/data:/var/opt/gitlab
                ports:
                        - "22:22"
                environment:
                        - HOSTNAME=git.domain.com
                        - VIRTUAL_HOST=git.domain.com
                        - LETSENCRYPT_HOST=git.domain.com
                        - LETSENCRYPT_EMAIL=letsencrypt@domain.com

networks:
  default:
    external:
      name: proxy_net

gitlab.rb

external_url 'http://git.domain.com'
gitlab_rails['gitlab_ssh_host'] = 'git.domain.com'
gitlab_rails['lfs_enabled'] = true
gitlab_rails['lfs_storage_path'] = "/var/opt/gitlab/gitlab-rails/shared/lfs-objects"
gitlab_rails['gitlab_shell_ssh_port'] = 22
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.some-domain.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "mail@domain.com"
gitlab_rails['smtp_password'] = "secret"
gitlab_rails['smtp_domain'] = "domain.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false

Ошибка:

PS C:\projects\test> git push origin master
warning: redirecting to https://git.domain.com/username/test.git/
Locking support detected on remote "origin". Consider enabling it with:
  $ git config lfs.http://git.domain.com/username/test.git/info/lfs.locksverify true
Uploading LFS objects:   0% (0/2), 1.3 MB | 225 KB/s, done
LFS: Put https://git.domain.com/username/test.git/gitlab-lfs/objects/8e90705f17a2ad31735aba29e18cd87603a8eb8bb24f7b87a9a587832011e82d/644489: read C:\projects\test\.git\lfs\objects\8e\90\8e90705f17a2ad31735aba29e18cd87603a8eb8bb24f7b87a9a587832011e82d: file already closed
LFS: Put https://git.domain.com/username/test.git/gitlab-lfs/objects/2810c31b6e994c3636419db4177f780cda15c99f05c7675e3581da86285ce876/301626: read C:\projects\test\.git\lfs\objects\28\10\2810c31b6e994c3636419db4177f780cda15c99f05c7675e3581da86285ce876: file already closed
error: failed to push some refs to 'http://git.domain.com/username/test.git'

Спасибо за помощь!

...