forked from data.coop/ansible
Add uptime kuma as a service we can deploy to a different host for monitoring.
This commit is contained in:
parent
46ffcd792c
commit
54a63ca069
4
roles/docker/files/vhost/uptime_kuma
Normal file
4
roles/docker/files/vhost/uptime_kuma
Normal file
|
@ -0,0 +1,4 @@
|
|||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $host;
|
9
roles/docker/tasks/pre_deploy/uptime_kuma.yml
Normal file
9
roles/docker/tasks/pre_deploy/uptime_kuma.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
- name: Upload vhost config for uptime domain
|
||||
copy:
|
||||
src: vhost/uptime_kuma
|
||||
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.uptime_kuma.domain }}_location"
|
||||
|
||||
- name: Upload vhost config for status domain
|
||||
copy:
|
||||
src: vhost/uptime_kuma
|
||||
dest: "{{ services.nginx_proxy.volume_folder }}/vhost/{{ services.uptime_kuma.status_domain }}_location"
|
23
roles/docker/templates/compose-files/uptime_kuma.yml.j2
Normal file
23
roles/docker/templates/compose-files/uptime_kuma.yml.j2
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Simple docker-compose.yml
|
||||
# You can change your port or volume location
|
||||
|
||||
version: '3.3'
|
||||
|
||||
services:
|
||||
uptime-kuma:
|
||||
image: "louislam/uptime-kuma:{{ services.uptime_kuma.version }}"
|
||||
restart: always
|
||||
container_name: uptime-kuma
|
||||
networks:
|
||||
- external_services
|
||||
volumes:
|
||||
- "./uptime-kuma-data:/app/data"
|
||||
environment:
|
||||
VIRTUAL_HOST: "{{ services.uptime_kuma.domain }},{{ services.uptime_kuma.status_domain }}"
|
||||
LETSENCRYPT_HOST: "{{ services.uptime_kuma.domain }},{{ services.uptime_kuma.status_domain }}"
|
||||
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
|
||||
|
||||
|
||||
networks:
|
||||
external_services:
|
||||
external: true
|
|
@ -14,4 +14,4 @@
|
|||
- name: Install Dell OpenManage
|
||||
apt:
|
||||
name: srvadmin-all
|
||||
when: not vagrant
|
||||
when: not vagrant and not skip_dell_apt_repo
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
---
|
||||
- import_tasks: ssh-port.yml
|
||||
tags: [change-ssh-port]
|
||||
when: not do_not_change_ssh_port
|
||||
|
||||
- import_tasks: dell-apt-repo.yml
|
||||
tags: [setup-dell-apt-repo]
|
||||
when: not vagrant
|
||||
when: not skip_dell_apt_repo and not vagrant
|
||||
|
||||
- import_tasks: upgrade.yml
|
||||
tags: [do-full-system-upgrade]
|
||||
|
|
32
uptime.data.coop.yml
Normal file
32
uptime.data.coop.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
# vim: ft=yaml.ansible
|
||||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
become: true
|
||||
vars:
|
||||
base_domain: "{{ 'datacoop.devel' if vagrant else 'data.coop' }}"
|
||||
letsencrypt_enabled: true
|
||||
letsencrypt_email: "admin@{{ base_domain }}"
|
||||
services:
|
||||
nginx_proxy:
|
||||
volume_folder: "{{ volume_root_folder }}/nginx"
|
||||
pre_deploy_tasks: true
|
||||
version: "1.3-alpine"
|
||||
acme_companion_version: "2.2"
|
||||
uptime_kuma:
|
||||
domain: "uptime.{{ base_domain }}"
|
||||
status_domain: "status.{{ base_domain }}"
|
||||
volume_folder: "{{ volume_root_folder }}/uptime_kuma"
|
||||
pre_deploy_tasks: true
|
||||
version: "latest"
|
||||
do_not_change_ssh_port: true
|
||||
skip_dell_apt_repo: true
|
||||
vagrant: false
|
||||
|
||||
tasks:
|
||||
- import_role:
|
||||
name: ubuntu_base
|
||||
tags:
|
||||
- base_only
|
||||
- import_role:
|
||||
name: docker
|
Loading…
Reference in a new issue