Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 81244d55a7 | |||
| 1cfd024285 | |||
| 26115c5660 | |||
| acef35ca8b | |||
| b531170bd7 | |||
| ad586c3cd3 | |||
| 6dfef08f7b | |||
| 934dd314a8 | |||
| 2529a918df | |||
| 7dfa20d3dd | |||
| 329620c7d7 | |||
| f820e89cf6 |
@@ -178,6 +178,13 @@ services:
|
|||||||
http: "3001"
|
http: "3001"
|
||||||
redis: "6383"
|
redis: "6383"
|
||||||
subuid: "100999"
|
subuid: "100999"
|
||||||
|
wikijs:
|
||||||
|
domain:
|
||||||
|
public: "wiki"
|
||||||
|
internal: "wiki.app"
|
||||||
|
ports:
|
||||||
|
http: "3002"
|
||||||
|
subuid: "100999"
|
||||||
|
|
||||||
version:
|
version:
|
||||||
packages:
|
packages:
|
||||||
@@ -185,28 +192,28 @@ version:
|
|||||||
step: "0.30.2"
|
step: "0.30.2"
|
||||||
kopia: "0.22.3"
|
kopia: "0.22.3"
|
||||||
blocky: "0.29.0"
|
blocky: "0.29.0"
|
||||||
alloy: "1.13.0"
|
alloy: "1.16.1"
|
||||||
containers:
|
containers:
|
||||||
# common
|
# common
|
||||||
caddy: "2.11.2"
|
caddy: "2.11.2"
|
||||||
# infra
|
# infra
|
||||||
step: "0.30.2"
|
step: "0.30.2"
|
||||||
ldap: "v0.6.2"
|
ldap: "v0.6.3"
|
||||||
x509-exporter: "3.21.0"
|
x509-exporter: "4.1.0"
|
||||||
prometheus: "v3.9.1"
|
prometheus: "v3.11.3"
|
||||||
loki: "3.6.5"
|
loki: "3.7.1"
|
||||||
grafana: "12.3.3"
|
grafana: "13.0.1"
|
||||||
## Postgresql
|
## Postgresql
|
||||||
postgresql: "18.2"
|
postgresql: "18.3"
|
||||||
# For immich - https://github.com/immich-app/base-images/blob/main/postgres/versions.yaml
|
# For immich - https://github.com/immich-app/base-images/blob/main/postgres/versions.yaml
|
||||||
# pgvector: "v0.8.1"
|
# pgvector: "v0.8.1"
|
||||||
vectorchord: "0.5.3"
|
vectorchord: "1.1.1"
|
||||||
# Auth
|
# Auth
|
||||||
authelia: "4.39.19"
|
authelia: "4.39.19"
|
||||||
# App
|
# App
|
||||||
vaultwarden: "1.35.8"
|
vaultwarden: "1.36.0"
|
||||||
gitea: "1.26.1"
|
gitea: "1.26.1"
|
||||||
redis: "8.6.1"
|
redis: "8.6.3"
|
||||||
immich: "v2.7.5"
|
immich: "v2.7.5"
|
||||||
actualbudget: "26.3.0"
|
actualbudget: "26.3.0"
|
||||||
paperless: "2.20.15"
|
paperless: "2.20.15"
|
||||||
@@ -218,3 +225,4 @@ version:
|
|||||||
collabora: "25.04.9.4.1"
|
collabora: "25.04.9.4.1"
|
||||||
ezbookkeeping: "1.4.0"
|
ezbookkeeping: "1.4.0"
|
||||||
sure: "0.7.0-hotfix.2"
|
sure: "0.7.0-hotfix.2"
|
||||||
|
wikijs: "2.5.314"
|
||||||
|
|||||||
@@ -257,6 +257,14 @@
|
|||||||
tags: ["site", "sure"]
|
tags: ["site", "sure"]
|
||||||
tags: ["site", "sure"]
|
tags: ["site", "sure"]
|
||||||
|
|
||||||
|
- name: Set wiki.js
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: "app"
|
||||||
|
tasks_from: "services/set_wikijs"
|
||||||
|
apply:
|
||||||
|
tags: ["site", "wikijs"]
|
||||||
|
tags: ["site", "wikijs"]
|
||||||
|
|
||||||
- name: Flush handlers right now
|
- name: Flush handlers right now
|
||||||
ansible.builtin.meta: "flush_handlers"
|
ansible.builtin.meta: "flush_handlers"
|
||||||
|
|
||||||
|
|||||||
@@ -122,3 +122,11 @@
|
|||||||
apply:
|
apply:
|
||||||
tags: ["init", "site", "tools"]
|
tags: ["init", "site", "tools"]
|
||||||
tags: ["init", "site", "tools"]
|
tags: ["init", "site", "tools"]
|
||||||
|
|
||||||
|
- name: Set kopia
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: "common"
|
||||||
|
tasks_from: "services/set_kopia"
|
||||||
|
apply:
|
||||||
|
tags: ["init", "site", "kopia"]
|
||||||
|
tags: ["init", "site", "kopia"]
|
||||||
|
|||||||
@@ -147,3 +147,14 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
listen: "notification_restart_sure"
|
listen: "notification_restart_sure"
|
||||||
ignore_errors: true # noqa: ignore-errors
|
ignore_errors: true # noqa: ignore-errors
|
||||||
|
|
||||||
|
- name: Restart wikijs
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: "wikijs.service"
|
||||||
|
state: "restarted"
|
||||||
|
enabled: true
|
||||||
|
scope: "user"
|
||||||
|
daemon_reload: true
|
||||||
|
changed_when: false
|
||||||
|
listen: "notification_restart_wikijs"
|
||||||
|
ignore_errors: true # noqa: ignore-errors
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
- name: Create wiki.js directory
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ node['home_path'] }}/{{ item }}"
|
||||||
|
state: "directory"
|
||||||
|
owner: "{{ services['wikijs']['subuid'] }}"
|
||||||
|
group: "svadmins"
|
||||||
|
mode: "0770"
|
||||||
|
loop:
|
||||||
|
- "data/containers/wikijs"
|
||||||
|
- "data/containers/wikijs/data"
|
||||||
|
- "data/containers/wikijs/export"
|
||||||
|
- "containers/wikijs"
|
||||||
|
- "containers/wikijs/ssl"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Deploy root certificate
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: |
|
||||||
|
{{ hostvars['console']['ca']['root']['crt'] }}
|
||||||
|
dest: "{{ node['home_path'] }}/containers/wikijs/ssl/{{ root_cert_filename }}"
|
||||||
|
owner: "{{ services['wikijs']['subuid'] }}"
|
||||||
|
group: "svadmins"
|
||||||
|
mode: "0440"
|
||||||
|
become: true
|
||||||
|
notify: "notification_restart_wikijs"
|
||||||
|
no_log: true
|
||||||
|
|
||||||
|
- name: Register secret value to podman secret
|
||||||
|
containers.podman.podman_secret:
|
||||||
|
name: "WIKIJS_DB_PASS"
|
||||||
|
data: "{{ hostvars['console']['postgresql']['password']['wikijs'] }}"
|
||||||
|
state: "present"
|
||||||
|
force: true
|
||||||
|
notify: "notification_restart_wikijs"
|
||||||
|
no_log: true
|
||||||
|
|
||||||
|
- name: Deploy wikijs.container file
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/app/wikijs/wikijs.container.j2"
|
||||||
|
dest: "{{ node['home_path'] }}/.config/containers/systemd/wikijs.container"
|
||||||
|
owner: "{{ ansible_user }}"
|
||||||
|
group: "svadmins"
|
||||||
|
mode: "0644"
|
||||||
|
notify: "notification_restart_wikijs"
|
||||||
|
|
||||||
|
- name: Enable wikijs.service
|
||||||
|
ansible.builtin.systemd:
|
||||||
|
name: "wikijs.service"
|
||||||
|
state: "started"
|
||||||
|
enabled: true
|
||||||
|
daemon_reload: true
|
||||||
|
scope: "user"
|
||||||
@@ -5,9 +5,10 @@
|
|||||||
- hardware
|
- hardware
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Deploy alloy deb file (x86_64)
|
- name: Download alloy deb file (x86_64)
|
||||||
ansible.builtin.copy:
|
ansible.builtin.get_url:
|
||||||
src: "{{ hostvars['console']['node']['data_path'] }}/bin/alloy-{{ version['packages']['alloy'] }}-amd64.deb"
|
url: "https://github.com/grafana/alloy/releases/download/v{{ version['packages']['alloy'] }}/\
|
||||||
|
alloy-{{ version['packages']['alloy'] }}-1.amd64.deb"
|
||||||
dest: "/var/cache/apt/archives/alloy-{{ version['packages']['alloy'] }}.deb"
|
dest: "/var/cache/apt/archives/alloy-{{ version['packages']['alloy'] }}.deb"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
@@ -15,9 +16,10 @@
|
|||||||
become: true
|
become: true
|
||||||
when: ansible_facts['architecture'] == "x86_64"
|
when: ansible_facts['architecture'] == "x86_64"
|
||||||
|
|
||||||
- name: Deploy alloy deb file (aarch64)
|
- name: Download alloy deb file (aarch64)
|
||||||
ansible.builtin.copy:
|
ansible.builtin.get_url:
|
||||||
src: "{{ hostvars['console']['node']['data_path'] }}/bin/alloy-{{ version['packages']['alloy'] }}-arm64.deb"
|
url: "https://github.com/grafana/alloy/releases/download/v{{ version['packages']['alloy'] }}/\
|
||||||
|
alloy-{{ version['packages']['alloy'] }}-1.arm64.deb"
|
||||||
dest: "/var/cache/apt/archives/alloy-{{ version['packages']['alloy'] }}.deb"
|
dest: "/var/cache/apt/archives/alloy-{{ version['packages']['alloy'] }}.deb"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
@@ -30,6 +32,7 @@
|
|||||||
deb: "/var/cache/apt/archives/alloy-{{ version['packages']['alloy'] }}.deb"
|
deb: "/var/cache/apt/archives/alloy-{{ version['packages']['alloy'] }}.deb"
|
||||||
state: "present"
|
state: "present"
|
||||||
become: true
|
become: true
|
||||||
|
notify: "notification_restart_alloy"
|
||||||
|
|
||||||
- name: Deploy alloy config
|
- name: Deploy alloy config
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|||||||
@@ -5,34 +5,36 @@
|
|||||||
- hardware
|
- hardware
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Check kopia installation
|
|
||||||
ansible.builtin.shell: |
|
|
||||||
command -v kopia
|
|
||||||
changed_when: false
|
|
||||||
failed_when: false
|
|
||||||
register: "is_kopia_installed"
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
- name: Set console kopia
|
- name: Set console kopia
|
||||||
when: node['name'] == 'console'
|
when: node['name'] == 'console'
|
||||||
block:
|
block:
|
||||||
- name: Apply cli tools (x86_64)
|
- name: Download kopia
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://github.com/kopia/kopia/releases/download/v{{ version['packages']['kopia'] }}/\
|
||||||
|
kopia_{{ version['packages']['kopia'] }}_linux_{{ item }}.deb"
|
||||||
|
dest: "{{ node['data_path'] }}/bin/kopia-{{ version['packages']['kopia'] }}-{{ item }}.deb"
|
||||||
|
owner: "{{ ansible_user }}"
|
||||||
|
group: "svadmins"
|
||||||
|
mode: "0600"
|
||||||
|
loop:
|
||||||
|
- "amd64"
|
||||||
|
- "arm64"
|
||||||
|
|
||||||
|
- name: Install kopia (x86_64)
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
deb: "{{ node['data_path'] }}/bin/kopia-{{ version['packages']['kopia'] }}-amd64.deb"
|
deb: "{{ node['data_path'] }}/bin/kopia-{{ version['packages']['kopia'] }}-amd64.deb"
|
||||||
state: "present"
|
state: "present"
|
||||||
become: true
|
become: true
|
||||||
when:
|
when: ansible_facts['architecture'] == "x86_64"
|
||||||
- ansible_facts['architecture'] == "x86_64"
|
|
||||||
- is_kopia_installed.rc != 0
|
- name: Install kopia (aarch64)
|
||||||
- name: Apply cli tools (aarch64)
|
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
deb: "{{ node['data_path'] }}/bin/kopia-{{ version['packages']['kopia'] }}-arm64.deb"
|
deb: "{{ node['data_path'] }}/bin/kopia-{{ version['packages']['kopia'] }}-arm64.deb"
|
||||||
state: "present"
|
state: "present"
|
||||||
become: true
|
become: true
|
||||||
when:
|
when: ansible_facts['architecture'] == "aarch64"
|
||||||
- ansible_facts['architecture'] == "aarch64"
|
|
||||||
- is_kopia_installed.rc != 0
|
- name: Connect console kopia server
|
||||||
- name: Connect kopia server
|
|
||||||
environment:
|
environment:
|
||||||
KOPIA_PASSWORD: "{{ hostvars['console']['kopia']['user']['console'] }}"
|
KOPIA_PASSWORD: "{{ hostvars['console']['kopia']['user']['console'] }}"
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
@@ -51,30 +53,36 @@
|
|||||||
- name: Set kopia uid
|
- name: Set kopia uid
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
kopia_uid: 951
|
kopia_uid: 951
|
||||||
- name: Deploy kopia deb file (x86_64)
|
|
||||||
ansible.builtin.copy:
|
- name: Download kopia deb file (x86_64)
|
||||||
src: "{{ hostvars['console']['node']['data_path'] }}/bin/kopia-{{ version['packages']['kopia'] }}-amd64.deb"
|
ansible.builtin.get_url:
|
||||||
|
url: "https://github.com/kopia/kopia/releases/download/v{{ version['packages']['kopia'] }}/\
|
||||||
|
kopia_{{ version['packages']['kopia'] }}_linux_amd64.deb"
|
||||||
dest: "/var/cache/apt/archives/kopia-{{ version['packages']['kopia'] }}.deb"
|
dest: "/var/cache/apt/archives/kopia-{{ version['packages']['kopia'] }}.deb"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
become: true
|
become: true
|
||||||
when: ansible_facts['architecture'] == "x86_64"
|
when: ansible_facts['architecture'] == "x86_64"
|
||||||
- name: Deploy kopia deb file (aarch64)
|
|
||||||
ansible.builtin.copy:
|
- name: Download kopia deb file (aarch64)
|
||||||
src: "{{ hostvars['console']['node']['data_path'] }}/bin/kopia-{{ version['packages']['kopia'] }}-arm64.deb"
|
ansible.builtin.get_url:
|
||||||
|
url: "https://github.com/kopia/kopia/releases/download/v{{ version['packages']['kopia'] }}/\
|
||||||
|
kopia_{{ version['packages']['kopia'] }}_linux_arm64.deb"
|
||||||
dest: "/var/cache/apt/archives/kopia-{{ version['packages']['kopia'] }}.deb"
|
dest: "/var/cache/apt/archives/kopia-{{ version['packages']['kopia'] }}.deb"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
become: true
|
become: true
|
||||||
when: ansible_facts['architecture'] == "aarch64"
|
when: ansible_facts['architecture'] == "aarch64"
|
||||||
|
|
||||||
- name: Create kopia group
|
- name: Create kopia group
|
||||||
ansible.builtin.group:
|
ansible.builtin.group:
|
||||||
name: "kopia"
|
name: "kopia"
|
||||||
gid: "{{ kopia_uid }}"
|
gid: "{{ kopia_uid }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Create kopia user
|
- name: Create kopia user
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: "kopia"
|
name: "kopia"
|
||||||
@@ -85,6 +93,7 @@
|
|||||||
comment: "Kopia backup User"
|
comment: "Kopia backup User"
|
||||||
state: "present"
|
state: "present"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Create kopia directory
|
- name: Create kopia directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item.name }}"
|
path: "{{ item.name }}"
|
||||||
@@ -101,12 +110,13 @@
|
|||||||
mode: "0700"
|
mode: "0700"
|
||||||
become: true
|
become: true
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: Install kopia
|
- name: Install kopia
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
deb: "/var/cache/apt/archives/kopia-{{ version['packages']['kopia'] }}.deb"
|
deb: "/var/cache/apt/archives/kopia-{{ version['packages']['kopia'] }}.deb"
|
||||||
state: "present"
|
state: "present"
|
||||||
become: true
|
become: true
|
||||||
when: is_kopia_installed.rc != 0
|
|
||||||
- name: Deploy kopia env
|
- name: Deploy kopia env
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ hostvars['console']['node']['config_path'] }}/services/systemd/common/kopia/kopia.env.j2"
|
src: "{{ hostvars['console']['node']['config_path'] }}/services/systemd/common/kopia/kopia.env.j2"
|
||||||
@@ -116,6 +126,7 @@
|
|||||||
mode: "0400"
|
mode: "0400"
|
||||||
become: true
|
become: true
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: Deploy kopia service files
|
- name: Deploy kopia service files
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ hostvars['console']['node']['config_path'] }}/services/systemd/common/kopia/{{ item }}.j2"
|
src: "{{ hostvars['console']['node']['config_path'] }}/services/systemd/common/kopia/{{ item }}.j2"
|
||||||
@@ -128,6 +139,7 @@
|
|||||||
- "kopia-backup.service"
|
- "kopia-backup.service"
|
||||||
- "kopia-backup.timer"
|
- "kopia-backup.timer"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Enable auto kopia rules update
|
- name: Enable auto kopia rules update
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: "kopia-backup.timer"
|
name: "kopia-backup.timer"
|
||||||
|
|||||||
@@ -49,42 +49,6 @@
|
|||||||
- "amd64"
|
- "amd64"
|
||||||
- "arm64"
|
- "arm64"
|
||||||
|
|
||||||
- name: Download kopia
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: "https://github.com/kopia/kopia/releases/download/v{{ version['packages']['kopia'] }}/\
|
|
||||||
kopia_{{ version['packages']['kopia'] }}_linux_{{ item }}.deb"
|
|
||||||
dest: "{{ node['data_path'] }}/bin/kopia-{{ version['packages']['kopia'] }}-{{ item }}.deb"
|
|
||||||
owner: "{{ ansible_user }}"
|
|
||||||
group: "svadmins"
|
|
||||||
mode: "0600"
|
|
||||||
loop:
|
|
||||||
- "amd64"
|
|
||||||
- "arm64"
|
|
||||||
|
|
||||||
- name: Download blocky
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: "https://github.com/0xERR0R/blocky/releases/download/v{{ version['packages']['blocky'] }}/\
|
|
||||||
blocky_v{{ version['packages']['blocky'] }}_Linux_{{ item }}.tar.gz"
|
|
||||||
dest: "{{ node['data_path'] }}/bin/blocky-{{ version['packages']['blocky'] }}-{{ item }}.tar.gz"
|
|
||||||
owner: "{{ ansible_user }}"
|
|
||||||
group: "svadmins"
|
|
||||||
mode: "0600"
|
|
||||||
loop:
|
|
||||||
- "x86_64"
|
|
||||||
- "arm64"
|
|
||||||
|
|
||||||
- name: Download alloy
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: "https://github.com/grafana/alloy/releases/download/v{{ version['packages']['alloy'] }}/\
|
|
||||||
alloy-{{ version['packages']['alloy'] }}-1.{{ item }}.deb"
|
|
||||||
dest: "{{ node['data_path'] }}/bin/alloy-{{ version['packages']['alloy'] }}-{{ item }}.deb"
|
|
||||||
owner: "{{ ansible_user }}"
|
|
||||||
group: "svadmins"
|
|
||||||
mode: "0600"
|
|
||||||
loop:
|
|
||||||
- "amd64"
|
|
||||||
- "arm64"
|
|
||||||
|
|
||||||
- name: Apply cli tools (x86_64)
|
- name: Apply cli tools (x86_64)
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
deb: "{{ node['data_path'] }}/bin/{{ item }}"
|
deb: "{{ node['data_path'] }}/bin/{{ item }}"
|
||||||
@@ -92,7 +56,6 @@
|
|||||||
loop:
|
loop:
|
||||||
- "sops-{{ version['packages']['sops'] }}-amd64.deb"
|
- "sops-{{ version['packages']['sops'] }}-amd64.deb"
|
||||||
- "step-{{ version['packages']['step'] }}-amd64.deb"
|
- "step-{{ version['packages']['step'] }}-amd64.deb"
|
||||||
- "kopia-{{ version['packages']['kopia'] }}-amd64.deb"
|
|
||||||
become: true
|
become: true
|
||||||
when: ansible_facts['architecture'] == "x86_64"
|
when: ansible_facts['architecture'] == "x86_64"
|
||||||
|
|
||||||
@@ -103,6 +66,5 @@
|
|||||||
loop:
|
loop:
|
||||||
- "sops-{{ version['packages']['sops'] }}-arm64.deb"
|
- "sops-{{ version['packages']['sops'] }}-arm64.deb"
|
||||||
- "step-{{ version['packages']['step'] }}-arm64.deb"
|
- "step-{{ version['packages']['step'] }}-arm64.deb"
|
||||||
- "kopia-{{ version['packages']['kopia'] }}-arm64.deb"
|
|
||||||
become: true
|
become: true
|
||||||
when: ansible_facts['architecture'] == "aarch64"
|
when: ansible_facts['architecture'] == "aarch64"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
state: "present"
|
state: "present"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Create blocky etc directory
|
- name: Create blocky directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
owner: "blocky"
|
owner: "blocky"
|
||||||
@@ -31,13 +31,38 @@
|
|||||||
mode: "0750"
|
mode: "0750"
|
||||||
state: "directory"
|
state: "directory"
|
||||||
loop:
|
loop:
|
||||||
|
- "/home/blocky"
|
||||||
|
- "/home/blocky/bin"
|
||||||
- "/etc/blocky"
|
- "/etc/blocky"
|
||||||
- "/etc/blocky/ssl"
|
- "/etc/blocky/ssl"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Download blocky (x86_64)
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://github.com/0xERR0R/blocky/releases/download/v{{ version['packages']['blocky'] }}/\
|
||||||
|
blocky_v{{ version['packages']['blocky'] }}_Linux_x86_64.tar.gz"
|
||||||
|
dest: "/home/blocky/bin/blocky-{{ version['packages']['blocky'] }}-x86_64.tar.gz"
|
||||||
|
owner: "blocky"
|
||||||
|
group: "blocky"
|
||||||
|
mode: "0600"
|
||||||
|
become: true
|
||||||
|
when: ansible_facts['architecture'] == "x86_64"
|
||||||
|
|
||||||
|
- name: Download blocky (aarch64)
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "https://github.com/0xERR0R/blocky/releases/download/v{{ version['packages']['blocky'] }}/\
|
||||||
|
blocky_v{{ version['packages']['blocky'] }}_Linux_arm64.tar.gz"
|
||||||
|
dest: "/home/blocky/bin/blocky-{{ version['packages']['blocky'] }}-arm64.tar.gz"
|
||||||
|
owner: "blocky"
|
||||||
|
group: "blocky"
|
||||||
|
mode: "0600"
|
||||||
|
become: true
|
||||||
|
when: ansible_facts['architecture'] == "aarch64"
|
||||||
|
|
||||||
- name: Deploy blocky binary file (x86_64)
|
- name: Deploy blocky binary file (x86_64)
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "{{ hostvars['console']['node']['data_path'] }}/bin/blocky-{{ version['packages']['blocky'] }}-x86_64.tar.gz"
|
src: "/home/blocky/bin/blocky-{{ version['packages']['blocky'] }}-x86_64.tar.gz"
|
||||||
|
remote_src: true
|
||||||
dest: "/usr/local/bin/"
|
dest: "/usr/local/bin/"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
@@ -52,7 +77,8 @@
|
|||||||
|
|
||||||
- name: Deploy blocky binary file (aarch64)
|
- name: Deploy blocky binary file (aarch64)
|
||||||
ansible.builtin.unarchive:
|
ansible.builtin.unarchive:
|
||||||
src: "{{ hostvars['console']['node']['data_path'] }}/bin/blocky-{{ version['packages']['blocky'] }}-arm64.tar.gz"
|
src: "/home/blocky/bin/blocky-{{ version['packages']['blocky'] }}-arm64.tar.gz"
|
||||||
|
remote_src: true
|
||||||
dest: "/usr/local/bin/"
|
dest: "/usr/local/bin/"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
- "nextcloud"
|
- "nextcloud"
|
||||||
- "ezbookkeeping"
|
- "ezbookkeeping"
|
||||||
- "sure"
|
- "sure"
|
||||||
|
- "wikijs"
|
||||||
|
|
||||||
- name: Create postgresql directory
|
- name: Create postgresql directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
@@ -8,9 +8,20 @@
|
|||||||
mode: "0770"
|
mode: "0770"
|
||||||
loop:
|
loop:
|
||||||
- "x509-exporter"
|
- "x509-exporter"
|
||||||
|
- "x509-exporter/config"
|
||||||
- "x509-exporter/certs"
|
- "x509-exporter/certs"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Deploy config.yaml
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ hostvars['console']['node']['config_path'] }}/services/containers/infra/x509-exporter/config/config.yaml"
|
||||||
|
dest: "{{ node['home_path'] }}/containers/x509-exporter/config/config.yaml"
|
||||||
|
owner: "{{ services['x509-exporter']['subuid'] }}"
|
||||||
|
group: "svadmins"
|
||||||
|
mode: "0440"
|
||||||
|
become: true
|
||||||
|
notify: "notification_restart_x509-exporter"
|
||||||
|
|
||||||
- name: Deploy certificates
|
- name: Deploy certificates
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: |
|
content: |
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ postgresql:
|
|||||||
nextcloud: ENC[AES256_GCM,data:ROsximNuWYMTZktmLJPx7W1Qol/uT+APgwoCtFO/6ZYYc3KxKvlk344eqEc=,iv:4d+MrfIHjJKAcwhvZ3g4go66uZcieuL7lngKErJd+fg=,tag:QbWOtxeCbiu62GyrE2atXg==,type:str]
|
nextcloud: ENC[AES256_GCM,data:ROsximNuWYMTZktmLJPx7W1Qol/uT+APgwoCtFO/6ZYYc3KxKvlk344eqEc=,iv:4d+MrfIHjJKAcwhvZ3g4go66uZcieuL7lngKErJd+fg=,tag:QbWOtxeCbiu62GyrE2atXg==,type:str]
|
||||||
ezbookkeeping: ENC[AES256_GCM,data:CYYQ5DVr8Na46QduvUNF6d0XBVSXTml34q3/PhIYIvUNviOVgCjqXA4wN7g=,iv:qRljohJ+wI50XxSgMElKp65HyV3mKRTqDGjw9C1S0d0=,tag:PClp7PRmC0+PV0SzZpJqqQ==,type:str]
|
ezbookkeeping: ENC[AES256_GCM,data:CYYQ5DVr8Na46QduvUNF6d0XBVSXTml34q3/PhIYIvUNviOVgCjqXA4wN7g=,iv:qRljohJ+wI50XxSgMElKp65HyV3mKRTqDGjw9C1S0d0=,tag:PClp7PRmC0+PV0SzZpJqqQ==,type:str]
|
||||||
sure: ENC[AES256_GCM,data:FULJ2gjJ2gZC3s324itW+CjGRBHIP9RnOqw5TT1UaiUhb7UHAPm1na+LsZk=,iv:c0GnVZkxprJUzPPq3TCQaZvAes9QQuvDXqgVLLaiQIg=,tag:uDxy/Lkd2hNK4AWwMNMslw==,type:str]
|
sure: ENC[AES256_GCM,data:FULJ2gjJ2gZC3s324itW+CjGRBHIP9RnOqw5TT1UaiUhb7UHAPm1na+LsZk=,iv:c0GnVZkxprJUzPPq3TCQaZvAes9QQuvDXqgVLLaiQIg=,tag:uDxy/Lkd2hNK4AWwMNMslw==,type:str]
|
||||||
|
wikijs: ENC[AES256_GCM,data:2drkkTevrcUrgxOHavIEPcemc2l5+/3GEAYNCYVL/63daVda5tzL61tPm2A=,iv:87qPrlRaosXO75eaxo4xjevVc1Pt9MiHv6lYFBB3MKU=,tag:SnVbVR4ZM0qvVmWpcgSKrg==,type:str]
|
||||||
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
|
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@@ -285,6 +286,15 @@ sure:
|
|||||||
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
|
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
#ENC[AES256_GCM,data:NkvAsD10P7qUvGPXeTY+rQ==,iv:GjsUk3Ht6RYW/rhkRhMSFEmtsAiS+dK7niYDJVBj2iE=,tag:8KnDcuRTm7P76Kh2hmWeXw==,type:comment]
|
||||||
|
wikijs:
|
||||||
|
il: ENC[AES256_GCM,data:gsAEHk4MI75EXIiqdb05RYSmlxaQ7mlYXTwTYYVJ20KC397T6xbHzvNojlI=,iv:iYc+BahiJ50LSr35/T1VCQsxsRen5rKLwQhfVQMkdz4=,tag:rscWcLWyTaSR4KEPJaes2A==,type:str]
|
||||||
|
oidc:
|
||||||
|
secret: ENC[AES256_GCM,data:+bmvyUkiQ+vnaJW7wgjohv4wdvliqx8whdSM8iBUJXGFy/QOs2oJm4FoUcA=,iv:U07y/+87zbXQ2hQ4HvzKcEH5nQsaSIF1Oh3yv6/ytWU=,tag:knGwjGhH5D/OSvW6j5S0VQ==,type:str]
|
||||||
|
hash: ENC[AES256_GCM,data:7jKBt9mdfxKDU6vBIP6k/wj0gIsRnLwwSrLOlnbbiNZVmbZXqv/UxEsLxCyx1rP2mzGgaxNCBh6WOo7mbSMPezMiuf/enrNrmIwpcP2R0H6LxGTiLFk/7EZ493oy7qFmmsM2qM7Y6qhhKUygD4XbJfVZ2sdojjIGAWy6XdpbbQICb5I=,iv:N3gPga+iDYUF0uAx671DP+4c7FYUKP12MEbYmKZRPAI=,tag:7tKwhxk5yQ0KfZrg0+v/rw==,type:str]
|
||||||
|
#ENC[AES256_GCM,data:ODXFUxxxdQ==,iv:s9zJVx6wo6x517tbNvC+FZ0dFzqbjqeLI6rXBq72hQA=,tag:bXoV2I3LbpmQyddJrtS3Qg==,type:comment]
|
||||||
|
#
|
||||||
|
#
|
||||||
#ENC[AES256_GCM,data:T4Wtn49AAxPd2QUFTR+q,iv:bH5goGWBDqumAat9dUv2OwfCUJUpuVqncTMqMBZUXhI=,tag:G+W6hHA+yftQ+4RJpXrxHg==,type:comment]
|
#ENC[AES256_GCM,data:T4Wtn49AAxPd2QUFTR+q,iv:bH5goGWBDqumAat9dUv2OwfCUJUpuVqncTMqMBZUXhI=,tag:G+W6hHA+yftQ+4RJpXrxHg==,type:comment]
|
||||||
switch:
|
switch:
|
||||||
password: ENC[AES256_GCM,data:qu0f9L7A0eFq/UCpaRs=,iv:W8LLOp3MSfd/+EfNEZNf91K8GgI5eUfVPoWTRES2C0Y=,tag:Q5FlAOfwqwJwPvd7k6i+0g==,type:str]
|
password: ENC[AES256_GCM,data:qu0f9L7A0eFq/UCpaRs=,iv:W8LLOp3MSfd/+EfNEZNf91K8GgI5eUfVPoWTRES2C0Y=,tag:Q5FlAOfwqwJwPvd7k6i+0g==,type:str]
|
||||||
@@ -314,7 +324,7 @@ sops:
|
|||||||
UmliaFNxVTBqRkI1QWJpWGpTRWxETW8KEY/8AfU73UOzCGhny1cNnd5dCNv7bHXt
|
UmliaFNxVTBqRkI1QWJpWGpTRWxETW8KEY/8AfU73UOzCGhny1cNnd5dCNv7bHXt
|
||||||
k+uyWPPi+enFkVaceSwMFrA66uaWWrwAj11sXEB7yzvGFPrnAGezjQ==
|
k+uyWPPi+enFkVaceSwMFrA66uaWWrwAj11sXEB7yzvGFPrnAGezjQ==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2026-05-06T07:38:04Z"
|
lastmodified: "2026-05-09T06:19:32Z"
|
||||||
mac: ENC[AES256_GCM,data:5Q9oN/oun7x1q7L4HWWM52V0YDPyoADBZICdgDwLPWqgpXabz5Z49xvKt+NLXwsC+5q3VK27Y9NS2ZWOXJJGE2uQ7XWYh08r4yA9wHXpq0LcBdhPeV3R1aVG8zVtsyV760ctqJnmfThM18lVgnVahJAQDmg6VPYMd/UV5cFbtAw=,iv:99S9Qt7BdvDCKLgEdUqcWI2M2dxzpN5koxe6W9asrpg=,tag:cEOceyMhocPKS1Wyhhoe4A==,type:str]
|
mac: ENC[AES256_GCM,data:XZQO+US/uCCngkzTi/C+shPw5kb3jWBwWbRd2eTwduBbuCMXUCiGPhPws27qMC3mCOmpr98AHJa5CS+chbC/bWwYqxwWPG03d6lN+EHJHPNiM6HBFhCIBv8d0+mNMlgQaS83Up+diSFliJZ54tOMYDvyj0iwYr1mVXN0QXHhAF4=,iv:e0spAJI5WETIxIpS7dmBwP/6eIrYaC37S8qXUtoE0Jw=,tag:GKlCgm/BAypbbe0S3OkObA==,type:str]
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.12.1
|
version: 3.12.1
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
[Quadlet]
|
||||||
|
DefaultDependencies=false
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Wiki.js
|
||||||
|
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Container]
|
||||||
|
Image=ghcr.io/requarks/wiki:{{ version['containers']['wikijs'] }}
|
||||||
|
ContainerName=wikijs
|
||||||
|
HostName=wikijs
|
||||||
|
PublishPort={{ services['wikijs']['ports']['http'] }}:3000/tcp
|
||||||
|
|
||||||
|
# Volumes
|
||||||
|
Volume=%h/data/containers/wikijs/data:/wiki/data:rw
|
||||||
|
Volume=%h/data/containers/wikijs/export:/wiki/export:rw
|
||||||
|
Volume=%h/containers/wikijs/ssl:/etc/ssl/wiki:ro
|
||||||
|
|
||||||
|
# General
|
||||||
|
Environment="TZ=Asia/Seoul"
|
||||||
|
|
||||||
|
# Database
|
||||||
|
Environment="DB_TYPE=postgres"
|
||||||
|
Environment="DB_HOST={{ services['postgresql']['domain'] }}.{{ domain['internal'] }}"
|
||||||
|
Environment="DB_PORT={{ services['postgresql']['ports']['tcp'] }}"
|
||||||
|
Environment="DB_USER=wikijs"
|
||||||
|
Environment="DB_NAME=wikijs_db"
|
||||||
|
Environment="DB_SSL=true"
|
||||||
|
Environment="NODE_EXTRA_CA_CERTS=/etc/ssl/wiki/{{ root_cert_filename }}"
|
||||||
|
Secret=WIKIJS_DB_PASS,type=env,target=DB_PASS
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStartPre=/usr/bin/nc -zv {{ services['postgresql']['domain'] }}.{{ domain['internal'] }} {{ services['postgresql']['ports']['tcp'] }}
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10s
|
||||||
|
TimeoutStopSec=120
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
@@ -430,3 +430,25 @@ identity_providers:
|
|||||||
access_token_signed_response_alg: 'none'
|
access_token_signed_response_alg: 'none'
|
||||||
userinfo_signed_response_alg: 'none'
|
userinfo_signed_response_alg: 'none'
|
||||||
token_endpoint_auth_method: 'client_secret_basic'
|
token_endpoint_auth_method: 'client_secret_basic'
|
||||||
|
# https://www.authelia.com/integration/openid-connect/clients/wikijs/
|
||||||
|
- client_id: 'wikijs'
|
||||||
|
client_name: 'Wiki'
|
||||||
|
client_secret: '{{ hostvars['console']['wikijs']['oidc']['hash'] }}'
|
||||||
|
public: false
|
||||||
|
authorization_policy: 'one_factor'
|
||||||
|
require_pkce: false
|
||||||
|
pkce_challenge_method: ''
|
||||||
|
redirect_uris:
|
||||||
|
# add Callback URL / Redirect URI HERE
|
||||||
|
- 'https://wiki.ilnmors.com/login/aa72242e-7058-4cfa-9504-19a4208062ea/callback' # Note this must be copied during step 7 of the Application configuration.
|
||||||
|
scopes:
|
||||||
|
- 'openid'
|
||||||
|
- 'profile'
|
||||||
|
- 'email'
|
||||||
|
response_types:
|
||||||
|
- 'code'
|
||||||
|
grant_types:
|
||||||
|
- 'authorization_code'
|
||||||
|
access_token_signed_response_alg: 'none'
|
||||||
|
userinfo_signed_response_alg: 'none'
|
||||||
|
token_endpoint_auth_method: 'client_secret_post'
|
||||||
|
|||||||
@@ -101,3 +101,9 @@
|
|||||||
header_up Host {http.request.header.X-Forwarded-Host}
|
header_up Host {http.request.header.X-Forwarded-Host}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{{ services['wikijs']['domain']['internal'] }}.{{ domain['internal'] }} {
|
||||||
|
import private_tls
|
||||||
|
reverse_proxy host.containers.internal:{{ services['wikijs']['ports']['http'] }} {
|
||||||
|
header_up Host {http.request.header.X-Forwarded-Host}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -172,6 +172,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{{ services['wikijs']['domain']['public'] }}.{{ domain['public'] }} {
|
||||||
|
import crowdsec_log
|
||||||
|
route {
|
||||||
|
crowdsec
|
||||||
|
reverse_proxy https://{{services['wikijs']['domain']['internal'] }}.{{ domain['internal'] }} {
|
||||||
|
header_up Host {http.reverse_proxy.upstream.host}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Internal domain
|
# Internal domain
|
||||||
{{ node['name'] }}.{{ domain['internal'] }} {
|
{{ node['name'] }}.{{ domain['internal'] }} {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
server:
|
||||||
|
listen: :9793
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- kind: file
|
||||||
|
name: homelab-certs
|
||||||
|
paths:
|
||||||
|
- /certs/*.crt
|
||||||
|
- /certs/*.pem
|
||||||
|
- /certs/*.cer
|
||||||
|
refreshInterval: 1m
|
||||||
@@ -11,11 +11,12 @@ Image=docker.io/enix/x509-certificate-exporter:{{ version['containers']['x509-ex
|
|||||||
ContainerName=x509-exporter
|
ContainerName=x509-exporter
|
||||||
HostName=X509-exporter
|
HostName=X509-exporter
|
||||||
|
|
||||||
|
Volume=%h/containers/x509-exporter/config/config.yaml:/etc/config.yaml:ro
|
||||||
Volume=%h/containers/x509-exporter/certs:/certs:ro
|
Volume=%h/containers/x509-exporter/certs:/certs:ro
|
||||||
|
|
||||||
PublishPort={{ services['x509-exporter']['ports']['http'] }}:9793
|
PublishPort={{ services['x509-exporter']['ports']['http'] }}:9793
|
||||||
|
|
||||||
Exec=--listen-address :9793 --watch-dir=/certs
|
Exec=--config /etc/config.yaml
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
# wiki.js
|
||||||
|
|
||||||
|
## Prerequisite
|
||||||
|
|
||||||
|
### Create database
|
||||||
|
|
||||||
|
- Create the password with `openssl rand -base64 32`
|
||||||
|
- Save this value in secrets.yaml in `postgresql.password.wikijs`
|
||||||
|
- Access infra server to create wikijs_db with `podman exec -it postgresql psql -U postgres`
|
||||||
|
|
||||||
|
```SQL
|
||||||
|
CREATE USER wikijs WITH PASSWORD 'postgresql.password.wikijs';
|
||||||
|
CREATE DATABASE wikijs_db;
|
||||||
|
ALTER DATABASE wikijs_db OWNER TO wikijs;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Create oidc secret and hash
|
||||||
|
|
||||||
|
- Create the secret with `openssl rand -base64 32`
|
||||||
|
- access to auth vm
|
||||||
|
- `podman exec -it authelia sh`
|
||||||
|
- `authelia crypto hash generate pbkdf2 --password 'wikijs.oidc.secret'`
|
||||||
|
- Save this value in secrets.yaml in `wikijs.oidc.secret` and `wikijs.oidc.hash`
|
||||||
|
- !CAUTION! Don't update authelia with ansible-playbook before configuration
|
||||||
|
|
||||||
|
### Add postgresql dump backup list
|
||||||
|
|
||||||
|
- [set_postgresql.yaml](../../../ansible/roles/infra/tasks/services/set_postgresql.yaml)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Set connected services list
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
connected_services:
|
||||||
|
- ...
|
||||||
|
- "wikijs"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Access
|
||||||
|
|
||||||
|
- https://wiki.ilnmors.com
|
||||||
|
- Administrator Email: admin@wiki.ilnmors.internal
|
||||||
|
- Password: wikijs.il.password
|
||||||
|
- Site URL: https://wiki.ilnmors.com
|
||||||
|
- INSTALL
|
||||||
|
|
||||||
|
### Group configuration
|
||||||
|
|
||||||
|
- Administration: Groups: Guests: PERMISSIONS
|
||||||
|
- Remove all permissions
|
||||||
|
- Administration: Groups: NEW GROUP
|
||||||
|
- Users
|
||||||
|
- Administration: Groups: Users: PERMISSIONS
|
||||||
|
- Grant all permission in CONTENT
|
||||||
|
|
||||||
|
- Administration: Groups: Users: PAGE RULES
|
||||||
|
- Allow / Deny: Allow
|
||||||
|
- Match: Path starts with
|
||||||
|
- Path: empty value
|
||||||
|
- Locale: Any / All
|
||||||
|
- Permissions:
|
||||||
|
- Grant all permission
|
||||||
|
- Update Group
|
||||||
|
|
||||||
|
### OIDC configuration
|
||||||
|
|
||||||
|
- Administration: Modules: Authentication
|
||||||
|
- Add Strategy: Generic OpenID Connect / OAuth2
|
||||||
|
- Display Name: Authelia
|
||||||
|
- client id: wikijs
|
||||||
|
- client secret: wikijs.oidc.secret
|
||||||
|
- Authorization Endpoint URL: https://authelia.ilnmors.com/api/oidc/authorization
|
||||||
|
- Token Endpoint URL: https://authelia.ilnmors.com/api/oidc/token
|
||||||
|
- User info Endpoint URL: https://authelia.ilnmors.com/api/oidc/userinfo
|
||||||
|
- Skip User Profile: untoggled
|
||||||
|
- Issure: https://authelia.ilnmors.com
|
||||||
|
- Email Claim: email
|
||||||
|
- Display Name Claim: displayName
|
||||||
|
- Picture Claim: picture
|
||||||
|
- Map Groups: untoggled
|
||||||
|
- Groups Claim: groups
|
||||||
|
- Registration: Allow self-registration: toggled
|
||||||
|
- Assign to group: Users
|
||||||
|
- Check: Callback URL / Redirect URI
|
||||||
|
- Apply
|
||||||
|
|
||||||
|
- add Callback URL / Redirect URI to [authelia config](../../../config/services/containers/auth/authelia/config/authelia.yaml.j2)
|
||||||
|
- update authelia
|
||||||
|
|
||||||
|
- logout from administrator
|
||||||
|
|
||||||
|
- login: Select Authentication Provider: Authelia
|
||||||
|
|
||||||
|
### Storage
|
||||||
|
|
||||||
|
- Administration: Modules: Stroage
|
||||||
|
- Local File System
|
||||||
|
- Path: /wiki/export
|
||||||
|
- Apply
|
||||||
|
|
||||||
|
### Locale
|
||||||
|
|
||||||
|
- Administration: Site: Locale
|
||||||
|
- Download what you needs.
|
||||||
|
- Korean, Arabic, French ...
|
||||||
@@ -37,14 +37,14 @@ podman exec -it -u postgres postgresql "psql -U postgres"
|
|||||||
> \l
|
> \l
|
||||||
> \q
|
> \q
|
||||||
|
|
||||||
# Restor database (manually)
|
# Restore database (manually)
|
||||||
podman exec -u postgres postgresql "psql -U postgres -f $POSTGRESQL_BACKUP_PATH_IN_CONTAINER/script.sql"
|
podman exec -u postgres postgresql "psql -U postgres -f $POSTGRESQL_BACKUP_PATH_IN_CONTAINER/script.sql"
|
||||||
|
|
||||||
# Backup service executes
|
# Backup service executes
|
||||||
systemctl --user start postgresql-cluster-backup.service
|
systemctl --user start postgresql-cluster-backup.service
|
||||||
|
|
||||||
# Stop and remove all data
|
# Stop and remove all data
|
||||||
systemctl --stop postgresql
|
systemctl --user stop postgresql
|
||||||
sudo find "/home/infra/data/containers/postgresql/data" -mindepth 1 -delete
|
sudo find "/home/infra/data/containers/postgresql/data" -mindepth 1 -delete
|
||||||
|
|
||||||
# Restore database
|
# Restore database
|
||||||
@@ -62,3 +62,39 @@ postgres=# SHOW shared_preload_libraries;
|
|||||||
vchord.so
|
vchord.so
|
||||||
(1 row)
|
(1 row)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Update and upgrade version
|
||||||
|
|
||||||
|
### Update version
|
||||||
|
|
||||||
|
#### Prerequisite
|
||||||
|
|
||||||
|
- Shutdown all related services on [infra, auth, app] vms.
|
||||||
|
- [service list](../../../ansible/roles/infra/tasks/services/set_postgresql.yaml)
|
||||||
|
- `systemctl --user stop $SERVICE`
|
||||||
|
|
||||||
|
- Run backup service unit on infra vm.
|
||||||
|
- `systemctl --user start postgresql-cluster-backup.service`
|
||||||
|
- `systemctl --user start postgresql-data-backup@$SERVICE.service`
|
||||||
|
|
||||||
|
- Modify postgresql and extension version and run ansible playbook
|
||||||
|
- [version info](../../../ansible/inventory/group_vars/all.yaml)
|
||||||
|
- `ansible-playbook playbooks/infra/site.yaml --tags "postgresql"`
|
||||||
|
|
||||||
|
- Check postgresql container and update extension
|
||||||
|
|
||||||
|
```postgresql
|
||||||
|
# immich example
|
||||||
|
# extension should be checked on each database which needs the extension
|
||||||
|
\c immich_db
|
||||||
|
\dx
|
||||||
|
# check the installed_version and default_version
|
||||||
|
ALTER EXTENSION vchord UPDATE;
|
||||||
|
REINDEX INDEX face_index;
|
||||||
|
REINDEX INDEX clip_index;
|
||||||
|
```
|
||||||
|
|
||||||
|
- Run playbook to start all services
|
||||||
|
- `ansible-playbook playbooks/[infra, auth, app]/site.yaml --tags "site"`
|
||||||
|
|
||||||
|
- Check all services
|
||||||
|
|||||||
@@ -131,7 +131,11 @@
|
|||||||
- ezbookkeeping has no function to share the account and budget to the other users.
|
- ezbookkeeping has no function to share the account and budget to the other users.
|
||||||
- actual budget's YNAB way is hard to adjust
|
- actual budget's YNAB way is hard to adjust
|
||||||
- sure is heavy, but it is not YNAB and it allows to share account the other users
|
- sure is heavy, but it is not YNAB and it allows to share account the other users
|
||||||
- WriteFreely
|
- [x] wiki.js
|
||||||
|
- check wiki.js to use as base wiki of documents.
|
||||||
|
- [ ] TriliumNext
|
||||||
|
- [ ] memos
|
||||||
|
- WriteFreely or directus + frontend(Astro)
|
||||||
- MediaCMS or PeerTube
|
- MediaCMS or PeerTube
|
||||||
- Funkwhale or Navidrome or Jellyfin
|
- Funkwhale or Navidrome or Jellyfin
|
||||||
- Kavita
|
- Kavita
|
||||||
|
|||||||
Reference in New Issue
Block a user