Commit 62ea1ba1 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'fixsourcepages2' into 'master'

Fix source installation docs and init script for gitlab-pages

See merge request gitlab-org/gitlab!67744
parents 26ce8d4a 2171a880
......@@ -127,17 +127,43 @@ The Pages daemon doesn't listen to the outside world.
# path: shared/pages
host: example.io
port: 80
access_control: false
port: 8090
https: false
artifacts_server: false
external_http: ["127.0.0.1:8090"]
secret_file: /home/git/gitlab/gitlab-pages/gitlab-pages-secret
```
1. Add the following configuration file to
`/home/git/gitlab/gitlab-pages/gitlab-pages.conf`, and be sure to change
`example.io` to the FQDN from which you want to serve GitLab Pages and
`gitlab.example.com` to the URL of your GitLab instance:
```ini
listen-http=:8090
pages-root=/home/git/gitlab/shared/pages
api-secret-key=/home/git/gitlab/gitlab-pages-secret
pages-domain=example.io
internal-gitlab-server=https://gitlab.example.com
```
You may use an `http` address, when running GitLab Pages and GitLab on the
same host. If you use `https` and use a self-signed certificate, be sure to
make your custom CA available to GitLab Pages, for example by setting the
`SSL_CERT_DIR` environment variable.
1. Add the secret API key:
```shell
sudo -u git -H openssl rand -base64 32 > /home/git/gitlab/gitlab-pages-secret
```
1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in
order to enable the pages daemon. In `gitlab_pages_options` the
`-pages-domain` must match the `host` setting that you set above.
order to enable the pages daemon:
```ini
gitlab_pages_enabled=true
gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090"
```
1. Copy the `gitlab-pages` NGINX configuration file:
......
......@@ -44,7 +44,7 @@ gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log"
gitlab_pages_enabled=false
gitlab_pages_dir=$(cd $app_root/../gitlab-pages 2> /dev/null && pwd)
gitlab_pages_pid_path="$pid_path/gitlab-pages.pid"
gitlab_pages_options="-pages-domain example.com -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090"
gitlab_pages_options="-config $app_root/gitlab-pages/gitlab-pages.conf"
gitlab_pages_log="$app_root/log/gitlab-pages.log"
shell_path="/bin/bash"
gitaly_enabled=true
......
......@@ -68,7 +68,7 @@ gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log"
# The -pages-domain must be specified the same as in `gitlab.yml > pages > host`.
# Set `gitlab_pages_enabled=true` if you want to enable the Pages feature.
gitlab_pages_enabled=false
gitlab_pages_options="-pages-domain example.com -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090"
gitlab_pages_options="-config $app_root/gitlab-pages/gitlab-pages.conf"
gitlab_pages_log="$app_root/log/gitlab-pages.log"
# mail_room_enabled specifies whether mail_room, which is used to process incoming email, is enabled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment