Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • infrastructure infrastructure
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 110
    • Issues 110
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Arch LinuxArch Linux
  • infrastructureinfrastructure
  • Issues
  • #247
Closed
Open
Issue created Dec 23, 2020 by Daniel M. Capella@polyzenContributor

Custom domain for asknot-ng GitLab Pages

cc @shibumi

Procedure for adding a GitLab Pages project to GitLab

Details

  • Project name: asknot-ng
  • Desired subdomain: whatcanwedofor.archlinux.org

New Pages site checklist

  1. Have a pipeline that outputs some static HTML to public/ during the build.

  2. Specify this path (public/) as an artifact path.

  3. GitLab should now recognize that you're trying to use Pages and will show some relevant information at https://gitlab.archlinux.org/your-namespace/your-project/pages

  4. At this page, you'll also need to add your custom domain. Add the custom domain you requested earlier. GitLab will then show domain verification information which you'll need in the next step.

  5. At this point, we'll need to add some stuff to archlinux.tf. It should look something like this. Make sure to substitute the your_domain and your-domain strings accordingly:

     resource "hetznerdns_record" "gitlab_pages_your_domain_a" {
       zone_id = hetznerdns_zone.archlinux.id
       name    = "your-domain"
       value   = hcloud_floating_ip.gitlab_pages.ip_address
       type    = "A"
     }
    
     resource "hetznerdns_record" "gitlab_pages_your_domain_aaaa" {
       zone_id = hetznerdns_zone.archlinux.id
       name    = "your-domain"
       value   = var.gitlab_pages_ipv6
       type    = "AAAA"
     }
    
     resource "hetznerdns_record" "gitlab_pages_your_domain_verification" {
       zone_id = hetznerdns_zone.archlinux.id
       name    = "_gitlab-pages-verification-code.your-domain"
       value   = "gitlab-pages-verification-code=your-code-shown-by-gitlab"
       type    = "TXT"
     }
  6. Run terraform apply and go back to GitLab. Hit Verify and it should pick up the new domain verification code. It should then also automatically begin fetching a certificate via Let's Encrypt. That should take roughly 10min.

Edited Dec 23, 2020 by Sven-Hendrik Haase
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking