summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelvin Vermeeren <mail@mel.vin>2017-11-16 22:29:57 +0100
committerMelvin Vermeeren <mail@mel.vin>2017-11-16 22:29:57 +0100
commit5ad463d9ef85a43211784ac6085418cb63ebe797 (patch)
treecbecdee5fb18e3c34cbf65f1abd911c18ae907ed
0.6.0 (tested on own server, works nicely)
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD34
-rw-r--r--config.cfg47
-rw-r--r--gitlab-pages.service23
4 files changed, 125 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..4512f4a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Thu Nov 16 21:29:30 UTC 2017
+pkgbase = gitlab-pages
+ pkgdesc = GitLab Pages daemon used to serve static websites for GitLab users
+ pkgver = 0.6.0
+ pkgrel = 1
+ url = https://gitlab.com/gitlab-org/gitlab-pages
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ backup = etc/gitlab-pages/config.cfg
+ source = https://gitlab.com/gitlab-org/gitlab-pages/repository/v0.6.0/archive.tar.gz
+ source = config.cfg
+ source = gitlab-pages.service
+ sha256sums = dfe97a2c7a28788c1d2158244599caacec6ea47d584945e5ce3ef993ca2808f6
+ sha256sums = 4395ad32d8de8032704ef43ac61427e78ffe24064c13d1c0f06634d0e4b78f90
+ sha256sums = 56568f9959efef8a1f40587dcd21942a9938aaa97e7bd0b5a628905147c7b4ed
+
+pkgname = gitlab-pages
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..162b878
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Melvin Vermeeren <mail@mel.vin>
+# Useful: https://gitlab.com/gitlab-org/gitlab-ce/issues/29963
+pkgname=gitlab-pages
+pkgver=0.6.0
+pkgrel=1
+pkgdesc='GitLab Pages daemon used to serve static websites for GitLab users'
+url='https://gitlab.com/gitlab-org/gitlab-pages'
+license=('MIT')
+arch=('i686' 'x86_64')
+depends=()
+makedepends=('go')
+source=("https://gitlab.com/gitlab-org/gitlab-pages/repository/v$pkgver/archive.tar.gz"
+ 'config.cfg'
+ 'gitlab-pages.service')
+backup=('etc/gitlab-pages/config.cfg')
+sha256sums=('dfe97a2c7a28788c1d2158244599caacec6ea47d584945e5ce3ef993ca2808f6'
+ '4395ad32d8de8032704ef43ac61427e78ffe24064c13d1c0f06634d0e4b78f90'
+ '56568f9959efef8a1f40587dcd21942a9938aaa97e7bd0b5a628905147c7b4ed')
+
+build() {
+ cd "$srcdir/$pkgname-v$pkgver-"*
+ # static build does not work with Arch's Go, you get:
+ # go install net: open /usr/lib/go/pkg/linux_amd64/net.a: permission denied
+ # this means the chroot function will not work
+ sed -i 's/\(export CGO_ENABLED := \)0/\11/' Makefile
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-v$pkgver-"*
+ install -Dm 755 gitlab-pages "$pkgdir/usr/bin/gitlab-pages"
+ install -Dm 644 "$srcdir/config.cfg" "$pkgdir/etc/gitlab-pages/config.cfg"
+ install -Dm 644 "$srcdir/gitlab-pages.service" "$pkgdir/usr/lib/systemd/system/gitlab-pages.service"
+}
diff --git a/config.cfg b/config.cfg
new file mode 100644
index 0000000..7e22091
--- /dev/null
+++ b/config.cfg
@@ -0,0 +1,47 @@
+# API URL to proxy artifact requests to, e.g.: 'https://gitlab.com/api/v4'
+#artifacts-server=string
+
+# Timeout (in seconds) for a proxied request to the artifacts server (default 10)
+#artifacts-server-timeout=int
+
+# Drop privileges to this group
+#daemon-gid=uint
+
+# Drop privileges to this user
+#daemon-uid=uint
+
+# Disable cross-origin requests
+#disable-cross-origin-requests
+
+# The address(es) to listen on for HTTP requests
+#listen-http=value
+
+# The address(es) to listen on for HTTPS requests
+#listen-https=value
+
+# The address(es) to listen on for proxy requests
+#listen-proxy=value
+
+# The address to listen on for metrics requests
+#metrics-address=string
+
+# The domain to serve static pages (default "gitlab-example.com")
+#pages-domain=string
+
+# The directory where pages are stored (default "shared/pages")
+#pages-root=string
+
+# The url path for a status page, e.g., /@status
+#pages-status=string
+
+# Redirect pages from HTTP to HTTPS
+#redirect-http
+
+# The default path to file certificate to serve static pages
+#root-cert=string
+
+# The default path to file certificate to serve static pages
+#root-key=string
+
+# Enable HTTP2 support (default true)
+#use-http2
diff --git a/gitlab-pages.service b/gitlab-pages.service
new file mode 100644
index 0000000..f325255
--- /dev/null
+++ b/gitlab-pages.service
@@ -0,0 +1,23 @@
+[Unit]
+Description=GitLab Pages
+After=syslog.target network.target
+ConditionFileIsExecutable=/usr/bin/gitlab-pages
+
+[Service]
+User=gitlab
+Group=gitlab
+StartLimitInterval=5
+StartLimitBurst=10
+ExecStart=/usr/bin/gitlab-pages -config /etc/gitlab-pages/config.cfg
+Restart=always
+RestartSec=120
+StandardOutput=syslog
+StandardError=syslog
+SyslogIdentifier=gitlab-pages
+PrivateTmp=true
+ProtectSystem=full
+ProtectHome=true
+CapabilityBoundingSet=
+
+[Install]
+WantedBy=multi-user.target