mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-08 11:17:17 +02:00
Added ldap support
This commit is contained in:
@@ -6,8 +6,9 @@ services:
|
||||
image: "{{ applications[application_id].images.friendica }}"
|
||||
{% include 'roles/docker-compose/templates/services/base.yml.j2' %}
|
||||
volumes:
|
||||
- html:/var/www/html
|
||||
- data:/var/www/data
|
||||
- html:{{ friendica_application_base }}
|
||||
- data:/var/www/data # I assume that this one is unnessecarry
|
||||
- {{ friendica_host_ldap_config }}:{{ friendica_docker_ldap_config }}:ro
|
||||
ports:
|
||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
# The configuration options can be found here:
|
||||
# @see https://hub.docker.com/_/friendica
|
||||
|
||||
FRIENDICA_URL= https://{{domains | get_domain(application_id)}}
|
||||
HOSTNAME= {{domains | get_domain(application_id)}}
|
||||
FRIENDICA_NO_VALIDATION={{no_validation | lower}}
|
||||
FRIENDICA_URL=https://{{domains | get_domain(application_id)}}
|
||||
HOSTNAME={{domains | get_domain(application_id)}}
|
||||
FRIENDICA_NO_VALIDATION={{friendica_no_validation | lower}}
|
||||
|
||||
# Debugging
|
||||
FRIENDICA_DEBUGGING= {% if enable_debug | bool %}true{% else %}false{% endif %}
|
||||
FRIENDICA_LOGLEVEL= 5
|
||||
FRIENDICA_LOGGER= syslog
|
||||
FRIENDICA_DEBUGGING={% if enable_debug | bool %}true{% else %}false{% endif %}{{"\n"}}
|
||||
FRIENDICA_LOGLEVEL={% if enable_debug | bool %}9{% else %}5{% endif %}{{"\n"}}
|
||||
FRIENDICA_LOGGER=syslog
|
||||
|
||||
# Database Configuration
|
||||
MYSQL_HOST= "{{database_host}}:{{database_port}}"
|
||||
|
51
roles/docker-friendica/templates/ldapauth.config.php.j2
Normal file
51
roles/docker-friendica/templates/ldapauth.config.php.j2
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
// Source: https://git.friendi.ca/friendica/friendica-addons/src/branch/develop/ldapauth
|
||||
|
||||
// Warning: Don't change this file! It only holds the default config values for this addon.
|
||||
// Instead, copy this file to config/ldapauth.config.php in your Friendica directory and set the correct values there
|
||||
|
||||
return [
|
||||
'ldapauth' => [
|
||||
// ldap_server (String)
|
||||
// ldap hostname server - required
|
||||
// Example: ldap_server = host.example.com
|
||||
'ldap_server' => '{{ ldap.server.uri }}',
|
||||
|
||||
// ldap_binddn (String)
|
||||
// admin dn - optional - only if ldap server dont have anonymous access
|
||||
// Example: ldap_binddn = cn=admin,dc=example,dc=com
|
||||
'ldap_binddn' => '{{ ldap.dn.administrator.data }}',
|
||||
|
||||
// ldap_bindpw (String)
|
||||
// admin password - optional - only if ldap server dont have anonymous access
|
||||
'ldap_bindpw' => '{{ ldap.bind_credential }}',
|
||||
|
||||
// ldap_searchdn (String)
|
||||
// dn to search users - required
|
||||
// Example: ldap_searchdn = ou=users,dc=example,dc=com
|
||||
'ldap_searchdn' => '{{ ldap.dn.ou.users }}',
|
||||
|
||||
// ldap_userattr (String)
|
||||
// attribute to find username - required
|
||||
// Example: ldap_userattr = uid
|
||||
'ldap_userattr' => '{{ ldap.user.attributes.id }}',
|
||||
|
||||
// ldap_group (String)
|
||||
// DN of the group whose member can auth on Friendica - optional
|
||||
'ldap_group' =>'',
|
||||
|
||||
// ldap_autocreateaccount (Boolean)
|
||||
// To create Friendica account if user exists in ldap
|
||||
// Requires an email and a simple (beautiful) nickname on user ldap object
|
||||
// active account creation - optional - default true
|
||||
'ldap_autocreateaccount' => true,
|
||||
|
||||
// ldap_autocreateaccount_emailattribute (String)
|
||||
// attribute to get email - optional - default : 'mail'
|
||||
'ldap_autocreateaccount_emailattribute' => '{{ ldap.user.attributes.mail }}',
|
||||
|
||||
// ldap_autocreateaccount_nameattribute (String)
|
||||
// attribute to get nickname - optional - default : 'givenName'
|
||||
'ldap_autocreateaccount_nameattribute' => '{{ ldap.user.attributes.firstname }}',
|
||||
],
|
||||
];
|
Reference in New Issue
Block a user