Работа Gitlab Pages в контейнере docker с proxy

Gitlab запущен в docker контейнере с обратным proxy (https://hub.docker.com/r/jwilder/nginx-proxy), Gitlab работает на домене gitlab.example.io. Хочу поднять Gitlab Pages. для чего прописываю в gitlab.rb:

pages_external_url "http://pages.example.io"
gitlab_pages['enable'] = true

Оба домена gitlab.example.io и pages.example.io обслуживаются по одному ip-адресу, но в контейнере в качестве виртуального хоста указан только gitlab.example.io.

Затем создаю простой проект test на html и css или группу с вложенным проектом group_test/group_nested/test:

index.html

<head>
</head>
<body>
<p>Hello World!</p>
</body>

gitlab-ci.yml

stages:
    - deploy
pages:
  tags:
    - latest
  stage: deploy
  script:
    - mkdir .public
    - cp -r * .public
    - mv .public public
  artifacts:
    paths:
      - public
  only:
    - main

По окончанию работы сборочной линии получаю url: http://user_name.pages.example.io/test или http://group_test.pages.example.io/group_nested/test.

При попытке получить доступ по url браузер выдает ошибку:

Not found. The requested URL was not found on this server.

Файлы расположены в /var/opt/gitlab/gitlab-rails/shared/pages в контейнере.

DNS сервер содержит запись *.example.io A ip-address.

Лог Gitlab pages:

==> /var/log/gitlab/gitlab-pages/current <==
{"level":"info","msg":"Checking GitLab internal API availability","time":"2021-09-19T21:21:40+03:00"}
{"error":"failed to connect to internal Pages API: HTTP status: 502","level":"warning","msg":"attempted to connect to the API","time":"2021-09-19T21:21:40+03:00"}
{"level":"info","msg":"Checking GitLab internal API availability","time":"2021-09-19T21:21:44+03:00"}
{"error":"failed to connect to internal Pages API: HTTP status: 502","level":"warning","msg":"attempted to connect to the API","time":"2021-09-19T21:21:44+03:00"}
{"level":"info","msg":"Checking GitLab internal API availability","time":"2021-09-19T21:21:49+03:00"}
{"error":"failed to connect to internal Pages API: HTTP status: 502","level":"warning","msg":"attempted to connect to the API","time":"2021-09-19T21:21:49+03:00"}
{"level":"info","msg":"Checking GitLab internal API availability","time":"2021-09-19T21:21:55+03:00"}
{"error":"failed to connect to internal Pages API: HTTP status: 502","level":"warning","msg":"attempted to connect to the API","time":"2021-09-19T21:21:55+03:00"}
{"level":"info","msg":"Checking GitLab internal API availability","time":"2021-09-19T21:22:03+03:00"}
{"level":"info","msg":"GitLab internal pages status API connected successfully","time":"2021-09-19T21:22:03+03:00"}

Сталкивался кто-нибудь с таким?


Ответы (0 шт):