Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation

This commit is contained in:
2025-07-08 23:43:13 +02:00
parent 6b87a049d4
commit 563d5fd528
1242 changed files with 2301 additions and 1355 deletions

View File

@@ -0,0 +1,20 @@
{% include 'roles/docker-compose/templates/base.yml.j2' %}
application:
image: "{{ applications[application_id].images.friendica }}"
{% include 'roles/docker-container/templates/base.yml.j2' %}
volumes:
- 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"
{% include 'roles/docker-container/templates/healthcheck/msmtp_curl.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
data:
html:
{% include 'roles/docker-compose/templates/networks.yml.j2' %}

View File

@@ -0,0 +1,31 @@
# 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={{friendica_no_validation | lower}}
# Debugging
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}}"
MYSQL_DATABASE= {{database_name}}
MYSQL_USER= {{database_username}}
MYSQL_PASSWORD= {{database_password}}
# Email Configuration
SMTP= {{system_email.host}}
SMTP_DOMAIN= {{system_email.domain}}
SMTP_PORT= {{system_email.port}}
SMTP_AUTH_USER= {{ users['no-reply'].email }}
SMTP_AUTH_PASS= {{ users['no-reply'].mailu_token }}
SMTP_TLS= {{ 'on' if system_email.tls else 'off' }}
SMTP_STARTTLS= {{ 'on' if system_email.start_tls else 'off' }}
SMTP_FROM= no-reply
# Administrator Credentials
FRIENDICA_ADMIN_MAIL= {{ users.administrator.email }}
MAILNAME= {{ users.administrator.email }}

View 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 }}',
],
];