feat(ezbookkeeping): release ezbookkeeping
deployment notes: - use ezbookkeeping for budget - compare to actual budget - it has no RBAC and sharing budget, try to sure (we-promise/sure)
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
[Quadlet]
|
||||
DefaultDependencies=false
|
||||
|
||||
[Unit]
|
||||
Description=ezBookkeeping
|
||||
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Container]
|
||||
Image=docker.io/mayswind/ezbookkeeping:{{ version['containers']['ezbookkeeping'] }}
|
||||
ContainerName=ezbookkeeping
|
||||
HostName=ezbookkeeping
|
||||
|
||||
PublishPort={{ services['ezbookkeeping']['ports']['http'] }}:8080/tcp
|
||||
|
||||
Volume=%h/data/containers/ezbookkeeping/data:/data:rw
|
||||
Volume=%h/containers/ezbookkeeping/ssl:/etc/ssl/ezbookkeeping:ro
|
||||
|
||||
# General
|
||||
Environment="TZ=Asia/Seoul"
|
||||
Environment="EBK_SERVER_DOMAIN={{ services['ezbookkeeping']['domain']['public'] }}.{{ domain['public'] }}"
|
||||
Environment="EBK_SERVER_ROOT_URL=https://{{ services['ezbookkeeping']['domain']['public'] }}.{{ domain['public'] }}/"
|
||||
Environment="EBK_LOG_MODE=console"
|
||||
|
||||
# Database
|
||||
Environment="EBK_DATABASE_TYPE=postgres"
|
||||
Environment="EBK_DATABASE_HOST={{ services['postgresql']['domain'] }}.{{ domain['internal'] }}:{{ services['postgresql']['ports']['tcp'] }}"
|
||||
Environment="EBK_DATABASE_NAME=ezbookkeeping_db"
|
||||
Environment="EBK_DATABASE_USER=ezbookkeeping"
|
||||
Secret=EBK_DATABASE_PASSWD,type=env
|
||||
Environment="EBK_DATABASE_SSL_MODE=verify-full"
|
||||
Environment="PGSSLROOTCERT=/etc/ssl/ezbookkeeping/{{ root_cert_filename }}"
|
||||
|
||||
# OIDC
|
||||
Environment="EBK_AUTH_ENABLE_OAUTH2_AUTH=true"
|
||||
Environment="EBK_AUTH_OAUTH2_PROVIDER=oidc"
|
||||
Environment="EBK_AUTH_OAUTH2_CLIENT_ID=ezbookkeeping"
|
||||
Secret=EBK_AUTH_OAUTH2_CLIENT_SECRET,type=env
|
||||
Environment="EBK_AUTH_OAUTH2_USE_PKCE=true"
|
||||
Environment="EBK_AUTH_OIDC_PROVIDER_BASE_URL=https://{{ services['authelia']['domain'] }}.{{ domain['public'] }}"
|
||||
Environment="EBK_AUTH_ENABLE_OIDC_DISPLAY_NAME=true"
|
||||
Environment="EBK_AUTH_OIDC_CUSTOM_DISPLAY_NAME=Authelia"
|
||||
|
||||
# Registration / auth policy
|
||||
Environment="EBK_AUTH_ENABLE_INTERNAL_AUTH=false"
|
||||
Environment="EBK_USER_ENABLE_REGISTER=true"
|
||||
Environment="EBK_AUTH_OAUTH2_AUTO_REGISTER=true"
|
||||
|
||||
# AI / MCP disabled by default
|
||||
Environment="EBK_MCP_ENABLE_MCP=false"
|
||||
Environment="EBK_LLM_TRANSACTION_FROM_AI_IMAGE_RECOGNITION=false"
|
||||
|
||||
[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
|
||||
@@ -387,3 +387,24 @@ identity_providers:
|
||||
access_token_signed_response_alg: 'none'
|
||||
userinfo_signed_response_alg: 'none'
|
||||
token_endpoint_auth_method: 'client_secret_post'
|
||||
# https://www.authelia.com/integration/openid-connect/clients/ezbookkeeping/
|
||||
- client_id: 'ezbookkeeping'
|
||||
client_name: 'ezBookkeeping'
|
||||
client_secret: '{{ hostvars['console']['ezbookkeeping']['oidc']['hash'] }}'
|
||||
public: false
|
||||
authorization_policy: 'one_factor'
|
||||
require_pkce: true
|
||||
pkce_challenge_method: 'S256'
|
||||
redirect_uris:
|
||||
- 'https://budget.ilnmors.com/oauth2/callback'
|
||||
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_basic'
|
||||
|
||||
@@ -89,3 +89,9 @@
|
||||
header_up Host {http.request.header.X-Forwarded-Host}
|
||||
}
|
||||
}
|
||||
{{ services['ezbookkeeping']['domain']['internal'] }}.{{ domain['internal'] }} {
|
||||
import private_tls
|
||||
reverse_proxy host.containers.internal:{{ services['ezbookkeeping']['ports']['http'] }} {
|
||||
header_up Host {http.request.header.X-Forwarded-Host}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
{{ services['ezbookkeeping']['domain']['public'] }}.{{ domain['public'] }} {
|
||||
import crowdsec_log
|
||||
route {
|
||||
crowdsec
|
||||
reverse_proxy https://{{services['ezbookkeeping']['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