forked from calvinbui/ansible-monorepo
/
umami.yml
72 lines (66 loc) · 2.65 KB
/
umami.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
- hosts: homelab
vars:
application: umami
docker_network: "{{ networks.pub }}"
tasks:
- name: Create config folder
ansible.builtin.file:
path: "{{ config_directory }}"
state: directory
owner: "{{ common_user }}"
group: "{{ common_group }}"
mode: "0771"
- name: Create postgres container
ansible.builtin.include_role:
name: postgres
vars:
postgres_version: 15
postgres_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
37356632623934376432366231323839613236316266326363613733303462353062396461333766
6139666437613863333066313932663632646465323932360a333262663933366531653436643966
35323936653362653130346166663961313334653430306138623032633838353630366536636639
3163666334346136610a323432636264373066393839333436396438303561646231313062363730
35613131643763633863633665613266396538313562373339343665336633313461
- name: Create container
ansible.builtin.include_role:
name: docker_container
vars:
image: ghcr.io/umami-software/umami:postgresql-v2.8.0
# https://umami.is/docs/environment-variables
env:
APP_SECRET: !vault |
$ANSIBLE_VAULT;1.1;AES256
37393730643433633438626261363630343865356534373330616332373263336263396430373966
3834636265643463623735656364323739326538626562360a643264363033336332396561663432
32613966323632333063646534643634636162333238373731363335343064636135336236316235
6431376536626536350a383831396466663033656436303232366564666166326564653261373332
31353630346265373230666337303235306663313337656562646364373132323337
DATABASE_URL: "{{ _postgres_url }}"
DISABLE_TELEMETRY: "1"
DISABLE_UPDATES: "1"
traefik:
- name: "umami-private"
port: 3000
rule: "Host(`{{ application }}.{{ common_tld }}`)"
- name: "umami-public"
port: 3000
rule: "Host(`umami.calvin.me`)"
- name: "umami-scripts"
port: 3000
rule: "Host(`u.calvin.me`)"
middlewares:
- "{{ application }}-script-path"
homepage:
name: umami
group: Monitoring
weight: 300
description: "Web analytics"
blackbox:
path: /api/heartbeat
labels:
'{
"traefik.http.middlewares.{{ application }}-script-path.replacepathregex.regex": "^/{{ application | b64encode }}.js",
"traefik.http.middlewares.{{ application }}-script-path.replacepathregex.replacement": "/script.js"
}'