Set up GitLab pages

This commit is contained in:
Jake Howard 2022-10-08 15:51:37 +01:00
parent 2dc13c6f40
commit 41582f50db
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 34 additions and 0 deletions

View file

@ -54,3 +54,10 @@ registry['storage'] = {
# https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6895 # https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6895
nginx['worker_processes'] = "auto" nginx['worker_processes'] = "auto"
# GitLab Pages
pages_external_url "https://gitlab-pages.theorangeone.net"
gitlab_pages["external_http"] = [":8008"]
gitlab_pages["access_control"] = true
pages_nginx["enable"] = false
gitlab_rails["pages_path"] = "/mnt/gitlab-bulk/pages"

View file

@ -6,8 +6,15 @@ http:
router-gitlab-registry: router-gitlab-registry:
rule: Host(`registry.git.theorangeone.net`) rule: Host(`registry.git.theorangeone.net`)
service: service-gitlab service: service-gitlab
router-gitlab-pages:
rule: HostRegexp(`gitlab-pages.theorangeone.net`, `{subdomain:[a-z]+}.gitlab-pages.theorangeone.net`)
service: service-gitlab-pages
services: services:
service-gitlab: service-gitlab:
loadBalancer: loadBalancer:
servers: servers:
- url: https://{{ pve_hosts.gitlab.ip }} - url: https://{{ pve_hosts.gitlab.ip }}
service-gitlab-pages:
loadBalancer:
servers:
- url: http://{{ pve_hosts.gitlab.ip }}:8008

View file

@ -26,6 +26,10 @@ entryPoints:
sans: "*.jakehoward.tech" sans: "*.jakehoward.tech"
- main: 0rng.one - main: 0rng.one
sans: "*.0rng.one" sans: "*.0rng.one"
{% if traefik_provider_gitlab %}
- main: gitlab-pages.theorangeone.net
sans: "*.gitlab-pages.theorangeone.net"
{% endif %}
proxyProtocol: proxyProtocol:
trustedIPs: trustedIPs:
- "{{ wireguard.cidr }}" - "{{ wireguard.cidr }}"

View file

@ -252,3 +252,19 @@ resource "cloudflare_record" "theorangeonenet_mailgun_dmarc" {
type = "TXT" type = "TXT"
ttl = 1 ttl = 1
} }
resource "cloudflare_record" "theorangeonenet_gitlab_pages" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "gitlab-pages"
value = cloudflare_record.theorangeonenet_git.hostname
type = "CNAME"
ttl = 1
}
resource "cloudflare_record" "theorangeonenet_gitlab_pages_wildcard" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "*.gitlab-pages"
value = cloudflare_record.theorangeonenet_gitlab_pages.hostname
type = "CNAME"
ttl = 1
}