feat(wiki.js): release wiki.js
deployment notes: - use this as personal/family wiki system - compare to affine / memos and triliumNext
This commit is contained in:
@@ -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'
|
||||
userinfo_signed_response_alg: 'none'
|
||||
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}
|
||||
}
|
||||
}
|
||||
{{ 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
|
||||
{{ node['name'] }}.{{ domain['internal'] }} {
|
||||
|
||||
Reference in New Issue
Block a user