chore(app): archive removed stacks from app
archived stacks: - actual-budget - ezbookkeeping - opencloud - trilium - vikunja - wikijs
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
identity_providers:
|
||||
oidc:
|
||||
clients:
|
||||
# https://www.authelia.com/integration/openid-connect/clients/wikijs/
|
||||
- client_id: 'wikijs'
|
||||
client_name: 'Wiki'
|
||||
client_secret: 'hash'
|
||||
public: false
|
||||
authorization_policy: 'one_factor'
|
||||
require_pkce: false
|
||||
pkce_challenge_method: ''
|
||||
redirect_uris:
|
||||
# add Callback URL / Redirect URI HERE
|
||||
- 'https://wikijs.example.com/login/$UUID/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'
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
services:
|
||||
wikijs:
|
||||
domain:
|
||||
public: ""
|
||||
internal: ""
|
||||
ports:
|
||||
http: ""
|
||||
subuid: "100999"
|
||||
|
||||
version:
|
||||
containers:
|
||||
wikijs: "2.5.314"
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
postgresql:
|
||||
password:
|
||||
wikijs: ""
|
||||
wikijs:
|
||||
admin: ""
|
||||
oidc:
|
||||
secret: ""
|
||||
hash: ""
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -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 ...
|
||||
Reference in New Issue
Block a user