diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md index cbd3032bd4e4fd3cac99f5d0b4315f65e08c0b2c..10ae8c7dedf2708d133a2e486998e733309f7342 100644 --- a/doc/administration/pages/index.md +++ b/doc/administration/pages/index.md @@ -332,6 +332,42 @@ The maximum size of the unpacked archive per project can be configured in the Admin area under the Application settings in the **Maximum size of pages (MB)**. The default is 100MB. +## Running GitLab Pages in a separate server + +You may want to run GitLab Pages daemon on a separate server in order to decrease the load on your main application server. +Follow the steps below to configure GitLab Pages in a separate server. + +1. Suppose you have the main GitLab application server named `app1`. Prepare +new Linux server (let's call it `app2`), create NFS share there and configure access to +this share from `app1`. Let's use the default GitLab Pages folder `/var/opt/gitlab/gitlab-rails/shared/pages` +as the shared folder on `app2` and mount it to `/mnt/pages` on `app1`. + +1. On `app2` install GitLab omnibus and modify `/etc/gitlab/gitlab.rb` this way: + + ```shell + external_url 'http://' + pages_external_url "http://" + postgresql['enable'] = false + redis['enable'] = false + prometheus['enable'] = false + unicorn['enable'] = false + sidekiq['enable'] = false + gitlab_workhorse['enable'] = false + gitaly['enable'] = false + alertmanager['enable'] = false + node_exporter['enable'] = false + ``` +1. Run `sudo gitlab-ctl reconfigure`. +1. On `app1` apply the following changes to `/etc/gitlab/gitlab.rb`: + + ```shell + gitlab_pages['enable'] = false + pages_external_url "http://" + gitlab_rails['pages_path'] = "/mnt/pages" + ``` + +1. Run `sudo gitlab-ctl reconfigure`. + ## Backup Pages are part of the [regular backup][backup] so there is nothing to configure.