ansible-base/roles/hedgedoc/templates/config.json.j2

65 lines
2.3 KiB
Plaintext
Raw Normal View History

2023-12-10 20:44:52 +01:00
{
2023-12-16 15:13:01 +01:00
"production": {
2025-10-09 01:45:22 +02:00
"loglevel": "{{cfg_hedgedoc.log_level}}",
{% if cfg_hedgedoc.database.kind == 'sqlite' %}
2023-12-10 20:44:52 +01:00
"db": {
"dialect": "sqlite",
2025-10-09 01:45:22 +02:00
"storage": "{{cfg_hedgedoc.database.data.sqlite.path}}"
2023-12-10 20:44:52 +01:00
},
{% endif %}
2025-10-09 01:45:22 +02:00
{% if cfg_hedgedoc.database.kind == 'postgresql' %}
"db": {
"dialect": "postgres",
2025-10-09 01:45:22 +02:00
"host": "{{cfg_hedgedoc.database.data.postgresql.host}}",
"port": {{cfg_hedgedoc.database.data.postgresql.port | to_json}},
"username": "{{cfg_hedgedoc.database.data.postgresql.username}}",
"password": "{{cfg_hedgedoc.database.data.postgresql.password}}",
"database": "{{cfg_hedgedoc.database.data.postgresql.schema}}"
},
{% endif %}
2025-10-09 01:45:22 +02:00
"sessionSecret": "{{cfg_hedgedoc.session_secret}}",
2023-12-16 15:13:01 +01:00
"host": "localhost",
"allowOrigin": [
"localhost"
],
2025-10-09 01:45:22 +02:00
"domain": "{{cfg_hedgedoc.domain}}",
2023-12-10 20:44:52 +01:00
"urlAddPort": false,
2023-12-16 15:13:01 +01:00
"protocolUseSSL": true,
2025-10-09 01:45:22 +02:00
{% if cfg_hedgedoc.authentication.kind == 'internal' %}
2024-03-20 00:07:58 +01:00
"email": true,
"allowEmailRegister": true,
{% endif %}
2025-10-09 01:45:22 +02:00
{% if cfg_hedgedoc.authentication.kind == 'authelia' %}
2023-12-10 20:44:52 +01:00
"oauth2": {
2025-10-09 01:45:22 +02:00
"providerName": "{{cfg_hedgedoc.authentication.data.authelia.provider_name}}",
"clientID": "{{cfg_hedgedoc.authentication.data.authelia.client_id}}",
"clientSecret": "{{cfg_hedgedoc.authentication.data.authelia.client_secret}}",
2023-12-10 20:44:52 +01:00
"scope": "openid email profile",
"userProfileUsernameAttr": "sub",
"userProfileDisplayNameAttr": "name",
"userProfileEmailAttr": "email",
2025-10-09 01:45:22 +02:00
"userProfileURL": "{{cfg_hedgedoc.authentication.data.authelia.url_base}}/api/oidc/userinfo",
"tokenURL": "{{cfg_hedgedoc.authentication.data.authelia.url_base}}/api/oidc/token",
"authorizationURL": "{{cfg_hedgedoc.authentication.data.authelia.url_base}}/api/oidc/authorization"
2023-12-16 15:13:01 +01:00
},
"email": false,
"allowEmailRegister": false,
{% endif %}
2025-10-09 01:45:22 +02:00
"allowAnonymous": {{cfg_hedgedoc.guest_allow_create | to_json}},
"allowAnonymousEdits": {{cfg_hedgedoc.guest_allow_change | to_json}},
{% if cfg_hedgedoc.free_names_mode == 'never' %}
"allowFreeURL": false,
"requireFreeURLAuthentication": false,
{% endif %}
2025-10-09 01:45:22 +02:00
{% if cfg_hedgedoc.free_names_mode == 'authed' %}
2023-12-16 15:13:01 +01:00
"allowFreeURL": true,
"requireFreeURLAuthentication": true,
{% endif %}
2025-10-09 01:45:22 +02:00
{% if cfg_hedgedoc.free_names_mode == 'always' %}
"allowFreeURL": true,
"requireFreeURLAuthentication": false,
{% endif %}
2023-12-16 15:13:01 +01:00
"defaultPermission": "editable"
2023-12-10 20:44:52 +01:00
}
}