Install gitlab pages daemon
I'll deal with traefik domains later
This commit is contained in:
parent
e579edc758
commit
c1dc26ce35
7 changed files with 100 additions and 0 deletions
|
@ -52,3 +52,4 @@
|
||||||
- upload
|
- upload
|
||||||
- website
|
- website
|
||||||
- duplicati
|
- duplicati
|
||||||
|
- gitlab-pages
|
||||||
|
|
38
ansible/roles/gitlab-pages/files/docker-compose.yml
Normal file
38
ansible/roles/gitlab-pages/files/docker-compose.yml
Normal 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"
|
19
ansible/roles/gitlab-pages/files/gitlab.rb
Normal file
19
ansible/roles/gitlab-pages/files/gitlab.rb
Normal 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
|
4
ansible/roles/gitlab-pages/files/install-rsync.sh
Normal file
4
ansible/roles/gitlab-pages/files/install-rsync.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "**** installing rsync ****"
|
||||||
|
apk add --no-cache rsync
|
4
ansible/roles/gitlab-pages/handlers/main.yml
Normal file
4
ansible/roles/gitlab-pages/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
- name: restart gitlab-pages
|
||||||
|
shell:
|
||||||
|
chdir: /opt/gitlab-pages
|
||||||
|
cmd: "{{ docker_update_command }}"
|
26
ansible/roles/gitlab-pages/tasks/main.yml
Normal file
26
ansible/roles/gitlab-pages/tasks/main.yml
Normal 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
|
|
@ -172,3 +172,11 @@ resource "cloudflare_record" "theorangeonenet_gitlab" {
|
||||||
type = "A"
|
type = "A"
|
||||||
ttl = 1
|
ttl = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_record" "theorangeonenet_gitlab_pages" {
|
||||||
|
zone_id = cloudflare_zone.theorangeonenet.id
|
||||||
|
name = "pages"
|
||||||
|
value = var.walker_ip
|
||||||
|
type = "A"
|
||||||
|
ttl = 1
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue