-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlubelogger.yml
103 lines (88 loc) · 3.79 KB
/
lubelogger.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
- hosts: homelab
vars:
application: lubelogger
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: Download init.sql
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/hargata/lubelog/main/init.sql
dest: "{{ config_directory }}/init.sql"
mode: "0644"
owner: "{{ common_user }}"
group: "{{ common_root_group }}"
- name: Create postgres container
ansible.builtin.import_role:
name: postgres
vars:
postgres_version: 17
postgres_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
38616237633732653936653966303535353631633334643037303663656334356437626438636665
3464656637373865376261376466643736636262613738370a383665653366333534313930333130
36333566323333643835653937633839363262356231663432353739353237356334363533633966
6461343735613431350a626162343736313736343437356137323430373165376436393032663838
35663632343534373838346532363761656665343034316632386632653966306530
postgres_directory_extra:
- "{{ config_directory }}/init.sql:/docker-entrypoint-initdb.d/init.sql:ro"
- name: Create container
ansible.builtin.include_role:
name: docker_container
vars:
image: ghcr.io/hargata/lubelogger:v1.4.3
env:
LC_ALL: "{{ common_language_iso_639 }}_{{ common_country_iso_3166 }}.UTF-8"
LANG: "{{ common_language_iso_639 }}_{{ common_country_iso_3166 }}.UTF-8"
MailConfig__EmailServer: "{{ common_email_server }}"
MailConfig__EmailFrom: "{{ application }}{{ common_email_to }}"
MailConfig__Port: "{{ common_email_port | string }}"
MailConfig__Username: "{{ common_email_username }}"
MailConfig__Password: "{{ common_email_password }}"
LOGGING__LOGLEVEL__DEFAULT: Error
POSTGRES_CONNECTION: "Host={{ _postgres_hostname }};Username={{ _postgres_username }};Password={{ _postgres_password }};Database={{ _postgres_database }};"
LUBELOGGER_ALLOWED_FILE_EXTENSIONS: "*"
OpenIDConfig__Name: "{{ oidc_provider }}"
OpenIDConfig__ClientId: "{{ application }}"
OpenIDConfig__ClientSecret: "{{ oidc_auth.lubelogger.secret }}"
OpenIDConfig__AuthURL: "{{ oidc_auth_url }}"
OpenIDConfig__TokenURL: "{{ oidc_token_url }}"
OpenIDConfig__RedirectURL: "{{ oidc_auth.lubelogger.redirect_uris[0] }}"
OpenIDConfig__Scope: "openid profile email"
OpenIDConfig__ValidateState: "true"
OpenIDConfig__UsePKCE: "true"
OpenIDConfig__DisableRegularLogin: "true"
OpenIDConfig__LogOutURL: "{{ oidc_signout_url }}"
volumes:
- "{{ config_directory }}/data:/App/data"
- "{{ config_directory }}/keys:/root/.aspnet/DataProtection-Keys"
traefik:
- port: 8080
homepage:
name: LubeLogger
group: Tools
weight: 300
description: "Vehicle maintenance and mileage tracker"
- name: Configure
json_patch: # noqa fqcn[action]
src: "{{ config_directory }}/data/config/userConfig.json"
pretty: true
operations:
- op: add
path: "{{ item.key }}"
value: "{{ item.value }}"
loop: "{{ _lubelogger_configuration | dict2items }}"
vars:
_lubelogger_configuration:
UseSystemColorMode: true
UseMPG: false
EnableAuth: true
DisableRegistration: true
EnableRootUserOIDC: true
DefaultReminderEmail: "{{ common_user }}{{ common_email_to }}"