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

65 lines
2.3 KiB
Text
Raw Normal View History

2023-12-10 20:44:52 +01:00
{
2023-12-16 15:13:01 +01:00
"production": {
"loglevel": "error",
{% if var_hedgedoc_database_kind == 'sqlite' %}
2023-12-10 20:44:52 +01:00
"db": {
"dialect": "sqlite",
2024-03-20 00:07:58 +01:00
"storage": "{{var_hedgedoc_database_data_sqlite_path}}"
2023-12-10 20:44:52 +01:00
},
{% endif %}
{% if var_hedgedoc_database_kind == 'postgresql' %}
"db": {
"dialect": "postgres",
"host": "{{var_hedgedoc_database_data_postgresql_host}}",
"port": {{var_hedgedoc_database_data_postgresql_port | to_json}},
"username": "{{var_hedgedoc_database_data_postgresql_username}}",
"password": "{{var_hedgedoc_database_data_postgresql_password}}",
"database": "{{var_hedgedoc_database_data_postgresql_schema}}"
},
{% endif %}
2023-12-16 15:13:01 +01:00
"sessionSecret": "{{var_hedgedoc_session_secret}}",
"host": "localhost",
"allowOrigin": [
"localhost"
],
"domain": "{{var_hedgedoc_domain}}",
2023-12-10 20:44:52 +01:00
"urlAddPort": false,
2023-12-16 15:13:01 +01:00
"protocolUseSSL": true,
2024-03-20 00:07:58 +01:00
{% if var_hedgedoc_authentication_kind == 'internal' %}
"email": true,
"allowEmailRegister": true,
{% endif %}
{% if var_hedgedoc_authentication_kind == 'authelia' %}
2023-12-10 20:44:52 +01:00
"oauth2": {
2024-03-20 00:07:58 +01:00
"providerName": "{{var_hedgedoc_authentication_data_authelia_provider_name}}",
"clientID": "{{var_hedgedoc_authentication_data_authelia_client_id}}",
"clientSecret": "{{var_hedgedoc_authentication_data_authelia_client_secret}}",
2023-12-10 20:44:52 +01:00
"scope": "openid email profile",
"userProfileUsernameAttr": "sub",
"userProfileDisplayNameAttr": "name",
"userProfileEmailAttr": "email",
2024-03-21 23:44:45 +01:00
"userProfileURL": "{{var_hedgedoc_authentication_data_authelia_url_base}}/api/oidc/userinfo",
"tokenURL": "{{var_hedgedoc_authentication_data_authelia_url_base}}/api/oidc/token",
"authorizationURL": "{{var_hedgedoc_authentication_data_authelia_url_base}}/api/oidc/authorize"
2023-12-16 15:13:01 +01:00
},
"email": false,
"allowEmailRegister": false,
{% endif %}
"allowAnonymous": {{var_hedgedoc_guest_allow_create | to_json}},
2024-03-20 00:07:58 +01:00
"allowAnonymousEdits": {{var_hedgedoc_guest_allow_change | to_json}},
{% if var_hedgedoc_free_names_mode == 'never' %}
"allowFreeURL": false,
"requireFreeURLAuthentication": false,
{% endif %}
{% if var_hedgedoc_free_names_mode == 'authed' %}
2023-12-16 15:13:01 +01:00
"allowFreeURL": true,
"requireFreeURLAuthentication": true,
{% endif %}
{% if var_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
}
}