Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement external in the/etc/gitlab/gitlab. rb file_ URL function #2829

Open
MybatisYang opened this issue Sep 14, 2023 · 1 comment

Comments

@MybatisYang
Copy link

How to implement external in the/etc/gitlab/gitlab. rb file_ URL function, I want to access it through traffic configuration/gitlab path

@kkimurak
Copy link
Contributor

kkimurak commented Sep 14, 2023

You are using the sameersbn/gitlab image and want to achieve a similar effect to setting external_url in /etc/gitlab/gitlab.rb in the official gitlab image, right? https://docs.gitlab.com/omnibus/settings/configuration.html#configure-the-external-url-for-gitlab

As mentioned in #1763 (comment), sameersbn/gitlab do not use /etc/gitlab/gitlab.rb for configuration. Instead, set container's environment variable GITLAB_HOST and GITLAB_PORT.
Also set GITLAB_RELATIVE_URL_ROOT and GITLAB_HTTPS and related params on demand.
external url is built from them like:
(${GITLAB_HTTPS}==true?"https":"http")://${GITLAB_HOST}:${GITLAB_PORT}${GITLAB_RELATIVE_URL_ROOT}.

I don't know what tool you are using (so many possibility like kubernates, docker-compose and so on), but for example, this can be achieved by passing as argument for docker run command like docker run --name gitlab -it --rm --env 'GITLAB_HOST=example.com').

Lastly, all the above explanations are written in README.md, so please read it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants