mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-22 16:21:09 +02:00
Optimized friendica database patch
This commit is contained in:
parent
257d0c4673
commit
2699edd197
@ -1,5 +1,6 @@
|
||||
- name: flush handlers to ensure that friendica is up before friendica addon configuration
|
||||
meta: flush_handlers
|
||||
|
||||
- name: Check if Friendica local.config.php exists
|
||||
command: docker exec --user {{ friendica_user }} {{ friendica_container }} test -f {{ friendica_config_file }}
|
||||
register: friendica_config_exists
|
||||
@ -12,23 +13,23 @@
|
||||
- name: Update DB host
|
||||
command: >
|
||||
docker exec --user {{ friendica_user }} {{ friendica_container }}
|
||||
sed -i "s/'hostname' => .*/'hostname' => '{{ database_host }}:{{ database_port }}',/" {{ friendica_config_file }}
|
||||
sed -ri "s/('hostname'\s*=>\s*')[^']*(',)/\1{{ database_host }}:{{ database_port }}\2/" {{ friendica_config_file }}
|
||||
notify: docker compose up
|
||||
|
||||
- name: Update DB name
|
||||
command: >
|
||||
docker exec --user {{ friendica_user }} {{ friendica_container }}
|
||||
sed -i "s/'database' => .*/'database' => '{{ database_name }}',/" {{ friendica_config_file }}
|
||||
sed -ri "s/('database'\s*=>\s*')[^']*(',)/\1{{ database_name }}\2/" {{ friendica_config_file }}
|
||||
notify: docker compose up
|
||||
|
||||
- name: Update DB user
|
||||
command: >
|
||||
docker exec --user {{ friendica_user }} {{ friendica_container }}
|
||||
sed -i "s/'username' => .*/'username' => '{{ database_username }}',/" {{ friendica_config_file }}
|
||||
sed -ri "s/('username'\s*=>\s*')[^']*(',)/\1{{ database_username }}\2/" {{ friendica_config_file }}
|
||||
notify: docker compose up
|
||||
|
||||
- name: Update DB password
|
||||
command: >
|
||||
docker exec --user {{ friendica_user }} {{ friendica_container }}
|
||||
sed -i "s/'password' => .*/'password' => '{{ database_password }}',/" {{ friendica_config_file }}
|
||||
sed -ri "s/('password'\s*=>\s*')[^']*(',)/\1{{ database_password }}\2/" {{ friendica_config_file }}
|
||||
notify: docker compose up
|
||||
|
@ -1,6 +1,7 @@
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
application:
|
||||
image: "{{ applications | get_app_conf(application_id, 'images.friendica', True) }}"
|
||||
container_name: "{{ friendica_container }}"
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
volumes:
|
||||
- html:{{ friendica_application_base }}
|
||||
|
@ -1,6 +1,6 @@
|
||||
application_id: "web-app-friendica"
|
||||
database_type: "mariadb"
|
||||
friendica_container: "application"
|
||||
application_id: "web-app-friendica"
|
||||
database_type: "mariadb"
|
||||
friendica_container: "friendica"
|
||||
friendica_no_validation: "{{ applications | get_app_conf(application_id, 'features.oidc', True) }}" # Email validation is not neccessary if OIDC is active
|
||||
friendica_application_base: "/var/www/html"
|
||||
friendica_docker_ldap_config: "{{friendica_application_base}}/config/ldapauth.config.php"
|
||||
|
Loading…
x
Reference in New Issue
Block a user