Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dbd72f43a4 | |||
| 9f236b6fa5 | |||
| b4a0874deb | |||
| c51216ff9b | |||
| 7debdfcb93 | |||
| da016343c0 | |||
| bf749ebbde | |||
| 41d509a49d | |||
| f062f6862f | |||
| 2dfc0f734e | |||
| f9211dfa24 | |||
| 8713631e0b | |||
| 01ad4350b0 |
@@ -177,7 +177,7 @@ version:
|
|||||||
vaultwarden: "1.35.4"
|
vaultwarden: "1.35.4"
|
||||||
gitea: "1.25.5"
|
gitea: "1.25.5"
|
||||||
redis: "8.6.1"
|
redis: "8.6.1"
|
||||||
immich: "v2.6.3"
|
immich: "v2.7.4"
|
||||||
actualbudget: "26.3.0"
|
actualbudget: "26.3.0"
|
||||||
paperless: "2.20.13"
|
paperless: "2.20.13"
|
||||||
vikunja: "2.2.2"
|
vikunja: "2.2.2"
|
||||||
|
|||||||
@@ -21,5 +21,6 @@ node:
|
|||||||
config_path: "{{ node.homelab_path }}/config"
|
config_path: "{{ node.homelab_path }}/config"
|
||||||
ssh_san: "console,console.ilnmors.internal"
|
ssh_san: "console,console.ilnmors.internal"
|
||||||
ssh_users: "vmm,fw,infra,auth,app"
|
ssh_users: "vmm,fw,infra,auth,app"
|
||||||
local_san: "localhost console.ilnmors.internal"
|
# add the hostname of wsl, it is needed to improve the sudo problem
|
||||||
|
local_san: "localhost console.ilnmors.internal surface"
|
||||||
# ansible_python_interpreter: "{{ ansible_playbook_python }}"
|
# ansible_python_interpreter: "{{ ansible_playbook_python }}"
|
||||||
|
|||||||
@@ -115,18 +115,10 @@
|
|||||||
become: true
|
become: true
|
||||||
tags: ["init", "site", "install-packages"]
|
tags: ["init", "site", "install-packages"]
|
||||||
|
|
||||||
- name: Install CLI tools
|
- name: Set CLI tools
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "console"
|
name: "console"
|
||||||
tasks_from: "services/set_cli_tools"
|
tasks_from: "services/set_cli_tools"
|
||||||
apply:
|
apply:
|
||||||
tags: ["init", "site", "tools"]
|
tags: ["init", "site", "tools"]
|
||||||
tags: ["init", "site", "tools"]
|
tags: ["init", "site", "tools"]
|
||||||
|
|
||||||
- name: Install chromium with font
|
|
||||||
ansible.builtin.include_role:
|
|
||||||
name: "console"
|
|
||||||
tasks_from: "services/set_chromium"
|
|
||||||
apply:
|
|
||||||
tags: ["init", "site", "chromium"]
|
|
||||||
tags: ["init", "site", "chromium"]
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
state: "directory"
|
state: "directory"
|
||||||
mode: "0700"
|
mode: "0700"
|
||||||
|
|
||||||
- name: Create contaienr data directory for app
|
- name: Create container data directory for app
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ node['home_path'] }}/data/containers"
|
path: "{{ node['home_path'] }}/data/containers"
|
||||||
owner: "{{ ansible_user }}"
|
owner: "{{ ansible_user }}"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
- name: Reload postgresql
|
- name: Reload postgresql
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
/usr/bin/podman exec -u postgres postgresql sh -c "pg_ctl reload"
|
/usr/bin/podman exec -u postgres postgresql sh -c "pg_ctl reload"
|
||||||
when: not (is_postgresql_init_run | default(false))
|
when: is_postgresql_init.stat.exists
|
||||||
changed_when: false
|
changed_when: false
|
||||||
listen: "notification_reload_postgresql"
|
listen: "notification_reload_postgresql"
|
||||||
ignore_errors: true # noqa: ignore-errors
|
ignore_errors: true # noqa: ignore-errors
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
scope: "user"
|
scope: "user"
|
||||||
when: not (is_postgresql_init_run | default(false))
|
when: is_postgresql_init.stat.exists
|
||||||
changed_when: false
|
changed_when: false
|
||||||
listen: "notification_restart_postgresql"
|
listen: "notification_restart_postgresql"
|
||||||
ignore_errors: true # noqa: ignore-errors
|
ignore_errors: true # noqa: ignore-errors
|
||||||
|
|||||||
@@ -88,15 +88,13 @@
|
|||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: Check data directory empty
|
- name: Check data directory empty
|
||||||
ansible.builtin.find:
|
ansible.builtin.stat:
|
||||||
paths: "{{ node['home_path'] }}/containers/postgresql/data/"
|
path: "{{ node['home_path'] }}/containers/postgresql/data/.init"
|
||||||
hidden: true
|
|
||||||
file_type: "any"
|
|
||||||
become: true
|
become: true
|
||||||
register: "is_data_dir_empty"
|
register: "is_postgresql_init"
|
||||||
|
|
||||||
- name: Prepare initiating DB
|
- name: Prepare initiating DB
|
||||||
when: is_data_dir_empty.matched == 0
|
when: not is_postgresql_init.stat.exists
|
||||||
become: true
|
become: true
|
||||||
block:
|
block:
|
||||||
# `init/pg_cluster.sql` should be fetched from postgresql's backup directory before running initiating
|
# `init/pg_cluster.sql` should be fetched from postgresql's backup directory before running initiating
|
||||||
@@ -118,9 +116,14 @@
|
|||||||
loop: "{{ connected_services }}"
|
loop: "{{ connected_services }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: index_num
|
index_var: index_num
|
||||||
- name: Set is_postgresql_init_run
|
|
||||||
ansible.builtin.set_fact:
|
- name: Create .init file
|
||||||
is_postgresql_init_run: true
|
ansible.builtin.file:
|
||||||
|
path: "{{ node['home_path'] }}/containers/postgresql/data/.init"
|
||||||
|
state: "touch"
|
||||||
|
mode: "0644"
|
||||||
|
owner: "{{ ansible_user }}"
|
||||||
|
group: "svadmins"
|
||||||
|
|
||||||
- name: Deploy container file
|
- name: Deploy container file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Image=docker.io/gitea/gitea:{{ version['containers']['gitea'] }}
|
|||||||
ContainerName=gitea
|
ContainerName=gitea
|
||||||
HostName=gitea
|
HostName=gitea
|
||||||
|
|
||||||
PublishPort=3000:3000/tcp
|
PublishPort={{ services['gitea']['ports']['http'] }}:3000/tcp
|
||||||
|
|
||||||
Volume=%h/data/containers/gitea:/data:rw
|
Volume=%h/data/containers/gitea:/data:rw
|
||||||
Volume=%h/containers/gitea/ssl:/etc/ssl/gitea:ro
|
Volume=%h/containers/gitea/ssl:/etc/ssl/gitea:ro
|
||||||
|
|||||||
@@ -25,6 +25,10 @@ Volume=%h/containers/immich/ssl:/etc/ssl/immich:ro
|
|||||||
|
|
||||||
# Environment
|
# Environment
|
||||||
Environment="TZ=Asia/Seoul"
|
Environment="TZ=Asia/Seoul"
|
||||||
|
# The new environment from version 2.7.0 to enable CSP
|
||||||
|
Environment="IMMICH_HELMET_FILE=true"
|
||||||
|
|
||||||
|
# Redis
|
||||||
Environment="REDIS_HOSTNAME=host.containers.internal"
|
Environment="REDIS_HOSTNAME=host.containers.internal"
|
||||||
Environment="REDIS_PORT={{ services['immich']['ports']['redis'] }}"
|
Environment="REDIS_PORT={{ services['immich']['ports']['redis'] }}"
|
||||||
Environment="REDIS_DBINDEX=0"
|
Environment="REDIS_DBINDEX=0"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ theme: 'auto'
|
|||||||
# Server configuration
|
# Server configuration
|
||||||
server:
|
server:
|
||||||
# TLS will be applied on caddy
|
# TLS will be applied on caddy
|
||||||
address: 'tcp://:9091/'
|
address: 'tcp://:{{ services['authelia']['ports']['http'] }}/'
|
||||||
|
|
||||||
# Log configuration
|
# Log configuration
|
||||||
log:
|
log:
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
import crowdsec_log
|
import crowdsec_log
|
||||||
route {
|
route {
|
||||||
crowdsec
|
crowdsec
|
||||||
reverse_proxy host.containers.internal:9091
|
reverse_proxy host.containers.internal:{{ services['authelia']['ports']['http'] }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# test.ilnmors.com {
|
# test.ilnmors.com {
|
||||||
|
|||||||
@@ -203,12 +203,11 @@ loki.relabel "caddy_relabel" {
|
|||||||
loki.process "journal_parser" {
|
loki.process "journal_parser" {
|
||||||
forward_to = [loki.write.loki.receiver]
|
forward_to = [loki.write.loki.receiver]
|
||||||
// Severity parsing
|
// Severity parsing
|
||||||
// If content of log includes "level" information, change the level
|
stage.regex {
|
||||||
stage.logfmt {
|
// Regex to extract the log level from the content.
|
||||||
mapping = {
|
expression = "(?i)(?:level[\"\\s:=]+|\\[|\\s|^)(?P<content_level>info|warn|warning|error|debug|fatal|critical|trace)(?:[\"\\]\\s]|$)"
|
||||||
"content_level" = "level",
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage.labels {
|
stage.labels {
|
||||||
values = {
|
values = {
|
||||||
"level" = "content_level",
|
"level" = "content_level",
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ ProtectHome=tmpfs
|
|||||||
InaccessiblePaths=/boot /root
|
InaccessiblePaths=/boot /root
|
||||||
|
|
||||||
{% if node['name'] == 'infra' %}
|
{% if node['name'] == 'infra' %}
|
||||||
BindReadOnlyPaths=/home/infra/containers/postgresql/backups
|
BindReadOnlyPaths=%h/containers/postgresql/backups
|
||||||
{% elif node['name'] == 'app' %}
|
{% elif node['name'] == 'app' %}
|
||||||
BindReadOnlyPaths=/home/app/data
|
BindReadOnlyPaths=%h/data
|
||||||
{% endif %}
|
{% endif %}
|
||||||
# In root namescope, %u always bring 0
|
# In root namescope, %u always bring 0
|
||||||
BindPaths=/etc/kopia
|
BindPaths=/etc/kopia
|
||||||
|
|||||||
@@ -1,5 +1,26 @@
|
|||||||
# Git configuration
|
# Git configuration
|
||||||
|
|
||||||
|
## Convention
|
||||||
|
|
||||||
|
- `type(scope): subject`
|
||||||
|
|
||||||
|
- type:
|
||||||
|
- feat: Append the new feature
|
||||||
|
- fix: Fix the bug or errors
|
||||||
|
- docs: Fix the documentations
|
||||||
|
- refactor: Modify code structure without functional changes
|
||||||
|
- perf: Improve the performance
|
||||||
|
- chore: Modify system, package manager, etc configuration
|
||||||
|
- style: Fix code formatting, etc...
|
||||||
|
|
||||||
|
## Commit and tags
|
||||||
|
|
||||||
|
- In this homelab, `[Infra_structure_change]:[Services_change]:[Documents_and_configuration_change]` is the tagging rule.
|
||||||
|
- Tagging and commit should be distinguished.
|
||||||
|
- The change which affects system: tagging
|
||||||
|
- The change which doesn't affect system: commit
|
||||||
|
- `git commit -m "docs(git): define git convention"`
|
||||||
|
|
||||||
## Local git
|
## Local git
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -29,14 +50,8 @@ git add .
|
|||||||
# Check git changes
|
# Check git changes
|
||||||
git status
|
git status
|
||||||
git commit -m "1.0.0: Release IaaS baseline"
|
git commit -m "1.0.0: Release IaaS baseline"
|
||||||
# git commit -m "docs: update 07-git.md to add the way to manage git system"
|
|
||||||
# Make current documents as snapshot
|
|
||||||
git tag -a 1.0.0 -m "IaaS baseline"
|
git tag -a 1.0.0 -m "IaaS baseline"
|
||||||
# Make special changes
|
|
||||||
# In this homelab, [Infra_structure_change]:[Services_change]:[Documents_and_configuration_change]
|
|
||||||
# Tagging and commit should be distinguished.
|
|
||||||
# The change which affects system: tagging
|
|
||||||
# The change which doesn't affect system: commit
|
|
||||||
|
|
||||||
# Commands
|
# Commands
|
||||||
git status # What files are changed
|
git status # What files are changed
|
||||||
|
|||||||
@@ -51,12 +51,15 @@ CREATE EXTENSION IF NOT EXISTS vector;
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
### About quota
|
### About community edition limitation
|
||||||
|
|
||||||
- Workspace seats for family: below 10 seats
|
- Workspace seats
|
||||||
- If 10 members is needed, then buy a licence
|
- The number of members itself \(account\) are unlimited.
|
||||||
|
- However the number of members who work on the same workspace simultaneously \(seats\) are designated as 10 members.
|
||||||
- Workspace storage quota
|
- Workspace storage quota
|
||||||
- They are planning unlimited storage quota, not now. Now they have 100GB quota for sync.
|
- Originally, self-hosted version has no limitation in storage quota and uploading file size.
|
||||||
|
- Now, there is some limitation even in the self-hosted version.
|
||||||
|
- It will be changed when the application is updating
|
||||||
|
|
||||||
### Following feature which will be applied in this system
|
### Following feature which will be applied in this system
|
||||||
|
|
||||||
|
|||||||
@@ -119,10 +119,11 @@
|
|||||||
- [x] Immich
|
- [x] Immich
|
||||||
- [x] Actual budget
|
- [x] Actual budget
|
||||||
- [x] Paperless-ngx
|
- [x] Paperless-ngx
|
||||||
- [x] vikunja
|
- [x] vikunja - When affine is verified to substitute kanban board and etc, then disable this service.
|
||||||
- OpenCloud \(with Radicale, Collabora Web Office\)
|
- [x] OpenCloud
|
||||||
- Outline
|
- [x] affine \(Notion substitution\)
|
||||||
- Wiki.js
|
- [ ] Radicale
|
||||||
|
- [ ] Collabora office
|
||||||
- WriteFreely
|
- WriteFreely
|
||||||
- MediaCMS
|
- MediaCMS
|
||||||
- Funkwhale
|
- Funkwhale
|
||||||
|
|||||||
Reference in New Issue
Block a user