Optimized handler flushing

This commit is contained in:
Kevin Veen-Birkenbach 2025-08-13 18:17:05 +02:00
parent e2014b9b59
commit 004507e233
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
12 changed files with 45 additions and 51 deletions

View File

@ -1,8 +1,4 @@
---
- name: "For '{{ application_id }}': load docker and db"
include_role:
name: cmp-db-docker
- name: "For '{{ application_id }}': include role to receive certs & do modification routines"
include_role:
name: srv-web-7-6-composer
@ -12,6 +8,12 @@
loop:
- "{{ domains | get_domain('web-app-mailu') }}"
- "{{ domain }}"
- name: "For '{{ application_id }}': load docker and db"
include_role:
name: cmp-db-docker
vars:
docker_compose_flush_handlers: true
- name: "For '{{ application_id }}': configure {{domains | get_domain(application_id)}}.conf"
template:

View File

@ -1,6 +1,3 @@
- name: flush docker service
meta: flush_handlers
- name: "Execute migration for '{{ application_id }}'"
command:
cmd: "docker-compose run --rm web bundle exec rails db:migrate"

View File

@ -1,8 +1,4 @@
---
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "Include setup for domain '{{ domain }}'"
include_role:
name: srv-proxy-6-6-domain
@ -11,11 +7,17 @@
loop_var: domain
vars:
http_port: "{{ ports.localhost.http[application_id] }}"
location_ws: "/api/v1/streaming"
location_ws: "/api/v1/streaming"
ws_port: "{{ ports.localhost.websocket[application_id] }}"
client_max_body_size: "80m"
vhost_flavour: "ws_generic"
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
vars:
docker_compose_flush_handlers: true
- name: "start setup procedures for mastodon"
include_tasks: 01_setup.yml
when: mastodon_setup |bool
when: mastodon_setup | bool

View File

@ -8,10 +8,6 @@
bridges: "{{ bridges_configuration | filter_enabled_bridges(applications | get_app_conf(application_id, 'plugins', True)) }}"
changed_when: false
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role for {{application_id}} to receive certs & do modification routines"
include_role:
name: srv-web-7-6-composer
@ -19,6 +15,12 @@
domain: "{{domains[application_id].synapse}}"
http_port: "{{ports.localhost.http['web-app-matrix_synapse']}}"
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
vars:
docker_compose_flush_handlers: false
- name: create {{well_known_directory}}
file:
path: "{{well_known_directory}}"

View File

@ -18,6 +18,3 @@ matrix_project: "{{ application_id | get_entity_name }}"
well_known_directory: "{{nginx.directories.data.well_known}}/matrix/"
location_upload: "~ ^/_matrix/media/v3/"
client_max_body_size: "{{ applications | get_app_conf(application_id, 'server.client_max_body_size') }}"
# Docker
docker_compose_flush_handlers: false

View File

@ -6,16 +6,16 @@
- include_tasks: utils/run_once.yml
when: run_once_web_app_mybb is not defined
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include tasks setup-domain.yml with {{domains | get_domain(application_id)}}"
include_tasks: setup-domain.yml
loop: "{{ mybb_domains + [source_domain] }}"
loop_control:
loop_var: domain
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "create {{docker_compose_instance_confd_directory}} and parent directories"
file:
path: "{{docker_compose_instance_confd_directory}}"

View File

@ -1,8 +1,4 @@
---
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include create-domains.yml for peertube"
include_tasks: create-domains.yml
loop: "{{ domains['web-app-peertube'] }}"
@ -13,6 +9,10 @@
http_port: "{{ ports.localhost.http[application_id] }}"
ws_port: "{{ ports.localhost.http[application_id] }}"
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "Install and activate auth-openid-connect plugin if OIDC is enabled"
include_tasks: enable-oidc.yml
when: applications | get_app_conf(application_id, 'features.oidc', False)

View File

@ -0,0 +1,2 @@
# Todo
- This role needs to be fully implemented

View File

@ -1,10 +1,7 @@
---
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
when: run_once_web_app_pretix is not defined
- name: run the pretix tasks once
set_fact:
run_once_web_app_pretix: true
- block:
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- include_tasks: utils/run_once.yml
when: run_once_web_app_pretix is not defined

View File

@ -1,17 +1,11 @@
---
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: "include role for {{application_id}} to receive certs & do modification routines"
include_role:
name: srv-web-7-6-composer
- name: configure {{domain}}.conf
template:
src: "templates/proxy.conf.j2"
dest: "{{nginx.directories.http.servers}}{{domain}}.conf"
notify: restart openresty
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
- name: configure {{domain}}.conf
template:

View File

@ -1,4 +1,5 @@
- name: "Run WordPress core install via WP CLI"
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"
command: >
docker exec -u {{ wordpress_user }} {{ wordpress_container }}
wp core install

View File

@ -1,10 +1,4 @@
---
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
vars:
docker_compose_flush_handlers: false
- name: "Include role srv-proxy-6-6-domain for {{ application_id }}"
include_role:
name: srv-proxy-6-6-domain
@ -15,6 +9,12 @@
proxy_extra_configuration: "client_max_body_size {{ wordpress_max_upload_size }};"
http_port: "{{ ports.localhost.http[application_id] }}"
- name: "load docker and db for {{application_id}}"
include_role:
name: cmp-db-docker
vars:
docker_compose_flush_handlers: false
- name: "Transfering upload.ini to {{ docker_compose.directories.instance }}"
template:
src: upload.ini.j2