[Gitlab]Where can I find Gitlab Pages hosted on my private Gitlab instance?
Asked Answered
F

4

19

I tried to set up Gitlab Pages, until now I finished uploading my static website files👇

Uploading artifacts...
coverage/lcov-report: found 77 matching files      
Uploading artifacts to coordinator... ok            id=1038 responseStatus=201 Created token=QXJjgkf2

But I got no idea where my page hosted.

I took a glance at this documentation but it was still vague to me.

  • I have a private Gitlab instance.
  • My Gitlab entry is under http://abc.def.com (I configured a type A DNS to my host IP 111.111.111.111, a reverse proxy pointing at localhost:9000).
  • My project project1 is under my team team1.
  • I have also configured DNS http://team1.abc.def.com to 111.111.111.111 , and there is a nginx reverse proxy on my server which http://team1.abc.def.com -> localhost:9000.

I assume I should see my static page available on http://team1.abc.def.com/project1 , but nothing was there. Where exactly are my pages hosted?

Fagot answered 21/4, 2017 at 17:15 Comment(1)
Did you manage to make it work, I have the same issue here! – Klein
K
6

You have to activate the pages feature. In your gitlab.rb:

pages_external_url "IP_OF_YOUR_GITLAB"
gitlab_pages['enable'] = true

There is a tutorial: https://www.youtube.com/watch?v=dD8c7WNcc6s&feature=youtu.be And the complete documentation: https://docs.gitlab.com/ce/administration/pages/index.html

Klein answered 22/11, 2018 at 10:57 Comment(1)
Jeremad, while this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Answers that are little more than a link may be deleted. – Interrupt
V
2

You'll need to ask your sysadmin under which wildcard domain Pages is served: https://docs.gitlab.com/ce/user/project/pages/getting_started_part_one.html#gitlab-pages-domain

Then you'll know where your site was deployed to.

Example: on GitLab.com, all Pages domains are served under *.gitlab.io, therefore, your website will be deployed to username.gitlab.io (user/group site) or to username.gitlab.io/project-name (project website).

You need to find out the wildcard domain of your GitLab instance and replace gitlab.io with it.

See also: Pages' limitations: https://docs.gitlab.com/ce/user/project/pages/introduction.html#limitations

Volcano answered 23/4, 2017 at 13:48 Comment(1)
OK, and plot twist - what if your username has a dot in it? For example j.smith? Would the address still be the same? j.smith.gitlab.mydomain.io/project-name ? Or would it be jsmith wihout the dot or won't work at all? – Burgeon
S
0

pages_external_url is the url of your website

You can set up a git-runner to pick the work for publishing your website. In this part you need to deal with .gitlab-ci.yml file

For the gitpage URL, you can find it under setting -> operate > pages, there should be a URL for the website. Usually is under namespace.example.com/projectname.

If you didn't see the page under the setting, it is usually a configuration issue. You just need to enable it, and re-congiure the gitlab.

Stroller answered 14/4, 2022 at 17:50 Comment(0)
B
-1

For gitlab pages to work, you need to put your website files (html, CSS etc.) in a folder named public.

Update your .gitlab-ci.yml file with something like the following

pages:
  script:
    - mv coverage/lcov-report public
  artifacts:
    paths:
      - public

Also, remember to name the job in question pages

Breadstuff answered 21/4, 2017 at 20:3 Comment(2)
Once you've done that where exactly are your pages hosted? – Stedmann
@Stedmann Have you set up Pages from an admin perspective? docs.gitlab.com/ce/administration/pages/index.html – Breadstuff

© 2022 - 2024 — McMap. All rights reserved.