Pages
This page contains information about developing GitLab Pages inside the GDK. This method allows you test GitLab Pages from deployment to visiting your static site.
For further details check the Contribute to GitLab Pages development.
Port
GDK features an HTTP-only GitLab Pages daemon on port 3010. Port number can be customized by editing gdk.yml as explained in GDK configuration.
Hostname
In order to handle wildcard hostnames, pages integration relies on nip.io and does not work on a disconnected system. This is the preferred configuration and the default value for the GitLab Pages hostname is 127.0.0.1.nip.io.
You can configure a custom host name. For example, to set up pages.gdk.test:
Set up the
gdk.testhostname.Add the following to
gdk.yml:gitlab_pages: enabled: true host: pages.gdk.testAlso add
pages.gdk.testas a hostname. For example, add the following to/etc/hosts:127.0.0.1 pages.gdk.test
However, to load your Pages domains, you must add an entry to the /etc/hosts file for each domain you want to access. For example, to access root.pages.gdk.test, add the following to /etc/hosts:
127.0.0.1 root.pages.gdk.testThat is because /etc/hosts does not support wildcard hostnames. An alternative is to use dnsmasq to handle wildcard hostnames.
Enable access control
Follow steps 3-6 in Enabling access control to create an OAuth application for GitLab Pages.
Add the following to
gdk.ymlgitlab_pages: enabled: true access_control: true auth_client_id: 'YOUR_CLIENT_ID' # replace with OAuth Client ID generated above auth_client_secret: 'YOUR_CLIENT_SECRET' # replace with OAuth Client Secret generated aboveReconfigure GDK
gdk reconfigureRestart GDK
gdk restart
Enable custom domains
Add the following to
gdk.ymlgitlab_pages: enabled: true enable_custom_domains: trueReconfigure GDK
gdk reconfigureRestart GDK
gdk restart