Kevin Veen-Birkenbach 94da112736
perf(friendica): single-pass patch for DB creds + system.url; align env URL; tidy vars
- Patch local.config.php in one sed exec:
  * hostname, database, username, password
  * system.url via '#' delimiter to avoid URL slash escaping
  * Single notify: docker compose up
- env.j2:
  * FRIENDICA_URL now uses domains|get_url(application_id, WEB_PROTOCOL)
  * Simplify FRIENDICA_DEBUGGING with |lower
  * Normalize spacing for readability
- vars/main.yml:
  * Minor cleanups (comment header, spacing)
  * Consistent friendica_docker_ldap_config path construction

Why: fewer container execs ⇒ faster runs; idempotent key updates; consistent URL configuration across env and PHP config.
Risk: requires WEB_PROTOCOL and domains|get_url to be defined in inventory/vars as elsewhere in the project.

https://chatgpt.com/share/689b92af-b184-800f-9664-2450e00b29d6
2025-08-12 21:15:33 +02:00

31 lines
1.1 KiB
Django/Jinja

# The configuration options can be found here:
# @see https://hub.docker.com/_/friendica
FRIENDICA_URL={{ domains | get_url(application_id, WEB_PROTOCOL) }}
HOSTNAME={{domains | get_domain(application_id)}}
FRIENDICA_NO_VALIDATION={{friendica_no_validation | lower}}
# Debugging
FRIENDICA_DEBUGGING={{ (enable_debug | bool) | lower }}{{"\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 }}