Here is what I did:
Created a group
Created a repo inside that group
Added README.md as suggested by the wizard
Added few more files
For some reason when trying to click on these files to open them, it is pointing to a weird URL instead of the real IP see below:
If I replace that b155e4f44228
with the actual URL which is http://172.26.164.179:81
then everything works fine and I can open the file.
I also spotted this weird string in the admin view when checking this project’s details, see:
Any ideas of what could have gone wrong here?
I didnt change anything special, I just pulled the latest gitlab/gitlab-ce:latest
straight from Dockerhub via Portainer
Thanks.
Hi there!
Can you check what the value of external_url
val is in your /etc/gitlab/gitlab.rb
file? The property is set at the very top of gitlab.rb
config file.
Here is the output from the container’s console
PS: I just realized the weird string matches the hostname in the console too (see ss above)
oh yeah, of course! you’re running in docker How could I miss the ipv4 and you mentioning dockerhub…
! READ THE NEXT REPLY !
Anyhow - the problem is that Gitlab is using the container’s hostname (the container ID) as the external URL.
You should, if you haven’t yet, read this https://docs.gitlab.com/omnibus/docker/
I suppose you have not set the --hostname
parameter when starting up the docker container.
Given your situation, you should start the container up with the --hostname 172.26.164.179
parameter set. And you should publish port 80
and not 81
Naw, pffff shame on me.
Just edit the /etc/gitlab/gitlab.rb
file on your host and set the external_url
parameter to 172.26.164.179:81
Sorry for the bad advice in the previous reply.
Thanks for your help, this seems to be the issue - ill try to pass external_url
to the container
You should rather edit the gitlab.rb
config file
I just did that and a gitlab-ctl reconfigure
for it to take effect but now im left with a 404
ill double check wtf I did
That’s working fine now, thanks @aljaxus !
Great !
Please mark the topic as “resolved” or something. I’m like 2 days on this forum, so I don’t really know the flow here.
I guess just add a [resolved]
prefix to your post’s title or something.
Have a nice day
1 Like
Buziek
June 2, 2023, 3:30pm
10
Hello!
aljaxus I need your help. I changed the external_url to my qnap’s ip, but it didn’t work. How to start a container with --hostname
parameter?