Install gitlab pages daemon

I'll deal with traefik domains later
This commit is contained in:
Jake Howard 2020-09-05 16:50:56 +01:00
parent e579edc758
commit c1dc26ce35
Signed by: jake
GPG key ID: 57AFB45680EDD477
7 changed files with 100 additions and 0 deletions

View file

@ -52,3 +52,4 @@
- upload
- website
- duplicati
- gitlab-pages

View file

@ -0,0 +1,38 @@
version: "2.3"
services:
gitlab-pages:
image: gitlab/gitlab-ce:latest
hostname: pages.theorangeone.net
environment:
TZ: Europe/London
GITLAB_OMNIBUS_CONFIG: |
{% filter indent(width=8) %}
{%- include "gitlab.rb" %}
{% endfilter %}
volumes:
- ./config:/etc/gitlab
- ./data:/var/opt/gitlab
- ./pages:/var/opt/gitlab/gitlab-rails/shared/pages
tmpfs:
- /var/log/gitlab
restart: unless-stopped
ssh-server:
image: linuxserver/openssh-server:latest
environment:
- TZ=Europe/London
- USER_NAME=user
- PUBLIC_KEY_FILE=/id_ed25519.pub
- PUID=998
- PGID=998
volumes:
- ./ssh:/config
- ./pages:/config/pages
- ./id_ed25519.pub:/id_ed25519.pub:ro
- ./install-rsync.sh:/config/custom-cont-init.d/install-rsync.sh:ro
tmpfs:
- /config/logs
ports:
- "{{ wireguard.clients.walker.ip }}:8222:2222"

View file

@ -0,0 +1,19 @@
external_url 'https://git.theorangeone.net'
grafana['enable'] = false
postgresql['enable'] = false
redis['enable'] = false
prometheus['enable'] = false
puma['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
gitaly['enable'] = false
alertmanager['enable'] = false
node_exporter['enable'] = false
gitlab_rails['auto_migrate'] = false
nginx['enabled'] = false
pages_external_url "https://pages.theorangeone.net"
pages_nginx['enable'] = false
gitlab_pages['external_http'] = ['0.0.0.0:8080']
gitlab_pages['inplace_chroot'] = true

View file

@ -0,0 +1,4 @@
#!/bin/bash
echo "**** installing rsync ****"
apk add --no-cache rsync

View file

@ -0,0 +1,4 @@
- name: restart gitlab-pages
shell:
chdir: /opt/gitlab-pages
cmd: "{{ docker_update_command }}"

View file

@ -0,0 +1,26 @@
- name: Create install directory
file:
path: /opt/gitlab-pages
state: directory
owner: "{{ docker_user.name }}"
mode: "{{ docker_compose_directory_mask }}"
become: true
- name: Install compose file
template:
src: files/docker-compose.yml
dest: /opt/gitlab-pages/docker-compose.yml
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
validate: /usr/bin/docker-compose -f %s config
notify: restart gitlab-pages
become: true
- name: Install rsync installer
template:
src: files/install-rsync.sh
dest: /opt/gitlab-pages/install-rsync.sh
mode: 0755
owner: "998"
notify: restart gitlab-pages
become: true

View file

@ -172,3 +172,11 @@ resource "cloudflare_record" "theorangeonenet_gitlab" {
type = "A"
ttl = 1
}
resource "cloudflare_record" "theorangeonenet_gitlab_pages" {
zone_id = cloudflare_zone.theorangeonenet.id
name = "pages"
value = var.walker_ip
type = "A"
ttl = 1
}