dataset/seed/nextcloud/templates/nextcloud-config.php

132 lines
4.8 KiB
PHP

<?php
$CONFIG = array (
'log_type' => 'syslog',
'debug' => false,
'datadirectory' => '/srv/nextcloud/data/',
'updatechecker' => false,
'check_for_working_htaccess' => false,
'asset-pipeline.enabled' => false,
'assetdirectory' => '/var/lib/nextcloud',
'preview_libreoffice_path' => '/usr/bin/libreoffice',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '{{ general.revprox.revprox_client.revprox_client_external_domainnames[0] }}',
),
'apps_paths' =>
array (
0 =>
array (
'path' => '/usr/share/nextcloud/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/usr/local/share/nextcloud/apps',
'url' => '/apps-appstore',
'writable' => true,
),
),
'dbtype' => 'pgsql',
'version' => '##VERSION##',
'overwrite.cli.url' => 'http://localhost',
'dbname' => '{{ general.postgresql.pg_client_database }}',
'dbhost' => '{{ general.postgresql.pg_client_server_domainname }}',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '{{ general.postgresql.pg_client_username }}',
'dbpassword' => '{{ general.postgresql.pg_client_password }}',
'dbdriveroptions' =>
array (
'sslmode' => 'verify-full',
'sslcert' => '{{ general.tls_cert_directory }}/postgresql.crt',
'sslkey' => '{{ general.tls_key_directory }}/postgresql.key',
'sslrootcert' => '{{ general.tls_ca_directory }}/PostgreSQL.crt',
),
'passwordsalt' => '##SALT##',
'secret' => '##SECRET##',
'instanceid' => '{{ general.nextcloud.nextcloud_instance_id }}',
'config_is_read_only' => true,
'installed' => false,
'maintenance' => false,
'appstoreenabled' => false,
'appcodechecker' => false,
# 'memcache.distributed' => '\\OC\\Memcache\\Redis',
# 'memcache.locking' => '\\OC\\Memcache\\Redis',
'trusted_proxies' => '{{ general.revprox.revprox_client_server_ip }}',
'overwritehost' => '{{ general.revprox.revprox_client.revprox_client_external_domainnames[0] }}',
'filelocking.enabled' => true,
'redis' =>
array (
'host' => '{{ general.redis.redis_client_server_domainname }}',
'port' => 6380,
'user' => '{{ general.redis.redis_client_username }}',
'password' => '{{ general.redis.redis_client_password }}',
'dbindex' => {{ general.redis.redis_client_index }},
'ssl_context' =>
array (
'local_cert' => '{{ general.tls_cert_directory }}/redis.crt',
'local_pk' => '{{ general.tls_key_directory }}/redis.key',
'cafile' => '{{ general.tls_ca_directory }}/Redis.crt',
),
),
'default_phone_region' => 'FR',
# OIDC login
'allow_user_to_change_display_name' => false,
'lost_password_link' => 'disabled',
'oidc_login_provider_url' => 'https://{{ general.oauth2_client.oauth2_client_server_domainname }}',
'oidc_login_client_id' => '{{ general.oauth2_client.oauth2_client_id }}',
'oidc_login_client_secret' => '{{ general.oauth2_client.oauth2_client_secret }}',
'oidc_login_auto_redirect' => true,
# FIXME 'oidc_login_logout_url' => 'https://openid.example.com/thankyou',
# FIXME to true
'oidc_login_end_session_redirect' => false,
# If no quota, we cannot send file
'oidc_login_default_quota' => '1000000000000000',
'oidc_login_button_text' => 'Log in with OpenID',
'oidc_login_hide_password_form' => true,
'oidc_login_use_id_token' => false,
'oidc_login_attributes' =>
array (
'id' => 'sub',
'name' => 'name',
'mail' => 'email',
# 'quota' => 'ownCloudQuota',
# 'home' => 'homeDirectory',
'ldap_uid' => 'uid',
# 'groups' => 'ownCloudGroups',
# 'photoURL' => 'picture',
# 'is_admin' => 'ownCloudAdmin',
),
'oidc_login_default_group' => 'oidc',
'oidc_login_scope' => 'openid profile email',
'oidc_login_proxy_ldap' => false,
'oidc_login_disable_registration' => true,
'oidc_login_redir_fallback' => false,
'oidc_login_alt_login_page' => 'assets/login.php',
'oidc_login_tls_verify' => true,
'oidc_create_groups' => false,
# FIXME
'oidc_login_webdav_enabled' => false,
'oidc_login_password_authentication' => false,
'oidc_login_public_key_caching_time' => 86400,
'oidc_login_min_time_between_jwks_requests' => 10,
'oidc_login_well_known_caching_time' => 86400,
'oidc_login_update_avatar' => false,
# mail
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_sendmailmode' => 'smtp',
{% set mailfrom, maildomain = general.nextcloud.nextcloud_mail_admin.split("@") %}
'mail_from_address' => '{{ mailfrom }}',
'mail_domain' => '{{ maildomain }}',
'mail_smtpauthtype' => 'PLAIN',
'mail_smtpauth' => 1,
'mail_smtphost' => '{{ general.smtp.smtp_relay_address }}',
'mail_smtpport' => '25',
'mail_smtpname' => '{{ general.smtp.smtp_relay_user }}@{{ general.smtp.smtp_client_ip }}',
'mail_smtppassword' => '{{ general.smtp.smtp_relay_password }}',
'loglevel' => 2,
'trashbin_retention_obligation' => 'auto, 14',
);