From fd0a978a16ea1494bcff8a84ec989c6dbaaa4a8f Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 23 Apr 2025 13:25:52 +0200 Subject: [PATCH] Different small optimatiosn --- .../templates/discourse_application.yml.j2 | 8 ++++++-- roles/docker-presentation/templates/env.j2 | 1 + roles/docker-wordpress/tasks/discourse/install.yml | 8 +++++++- roles/docker-wordpress/tasks/oidc/install.yml | 7 ------- roles/docker-wordpress/vars/discourse.yml | 2 +- templates/vars/applications.yml.j2 | 2 +- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/roles/docker-discourse/templates/discourse_application.yml.j2 b/roles/docker-discourse/templates/discourse_application.yml.j2 index 44e7e3c2..99f0ac5d 100644 --- a/roles/docker-discourse/templates/discourse_application.yml.j2 +++ b/roles/docker-discourse/templates/discourse_application.yml.j2 @@ -50,15 +50,19 @@ env: ## on initial signup example 'user1@example.com,user2@example.com' DISCOURSE_DEVELOPER_EMAILS: {{users.administrator.email}} + # Set Logo + DISCOURSE_LOGO_URL: "{{service_provider.platform.logo}}" + DISCOURSE_LOGO_SMALL_URL: "{{service_provider.platform.logo}}" + # SMTP ADDRESS, username, and password are required # WARNING the char '#' in SMTP password can cause problems! DISCOURSE_SMTP_ADDRESS: {{ system_email.host }} DISCOURSE_SMTP_PORT: {{ system_email.port }} - DISCOURSE_SMTP_USER_NAME: {{system_email.username}} + DISCOURSE_SMTP_USER_NAME: {{ system_email.username }} DISCOURSE_SMTP_PASSWORD: {{ system_email.password }} DISCOURSE_SMTP_ENABLE_START_TLS: {{ system_email.start_tls | upper }} DISCOURSE_SMTP_DOMAIN: {{ system_email.domain }} - DISCOURSE_NOTIFICATION_EMAIL: {{system_email.from}} + DISCOURSE_NOTIFICATION_EMAIL: {{ system_email.from }} # Database Configuration DISCOURSE_DB_USERNAME: {{ database_username }} diff --git a/roles/docker-presentation/templates/env.j2 b/roles/docker-presentation/templates/env.j2 index e69de29b..d370a1bf 100644 --- a/roles/docker-presentation/templates/env.j2 +++ b/roles/docker-presentation/templates/env.j2 @@ -0,0 +1 @@ +FLASK_DEBUG={{ enable_debug }} \ No newline at end of file diff --git a/roles/docker-wordpress/tasks/discourse/install.yml b/roles/docker-wordpress/tasks/discourse/install.yml index af196c92..366942d9 100644 --- a/roles/docker-wordpress/tasks/discourse/install.yml +++ b/roles/docker-wordpress/tasks/discourse/install.yml @@ -3,13 +3,19 @@ include_role: name: docker-discourse +- name: Wait for Discourse API + wait_for: + host: "{{ domains.discourse }}" + port: 80 + delay: 5 + timeout: 600 + - name: "Generate Discourse API Key when WP Discourse is enabled" include_tasks: generate-api-key.yml - name: "Load WP Discourse settings" include_vars: file: "{{ role_path }}/vars/discourse.yml" - # <— drop the `name:` here so `discourse_settings` is the list itself - name: "Install WP Discourse plugin" command: > diff --git a/roles/docker-wordpress/tasks/oidc/install.yml b/roles/docker-wordpress/tasks/oidc/install.yml index c788aa9c..691ac31d 100644 --- a/roles/docker-wordpress/tasks/oidc/install.yml +++ b/roles/docker-wordpress/tasks/oidc/install.yml @@ -7,13 +7,6 @@ args: chdir: "{{ docker_compose.directories.instance }}" -- name: Wait for Discourse API - wait_for: - host: "{{ domains.discourse }}" - port: 80 - delay: 5 - timeout: 600 - - name: "Activate OpenID Connect Generic Plugin" command: > docker-compose exec -u www-data -T application diff --git a/roles/docker-wordpress/vars/discourse.yml b/roles/docker-wordpress/vars/discourse.yml index 29f29aa3..a1c18d0a 100644 --- a/roles/docker-wordpress/vars/discourse.yml +++ b/roles/docker-wordpress/vars/discourse.yml @@ -242,4 +242,4 @@ discourse_settings: # - name: discourse_logs key: logs-enabled - value: {{ enable_debug }} + value: "{{ enable_debug }}" diff --git a/templates/vars/applications.yml.j2 b/templates/vars/applications.yml.j2 index 2af5f0c6..ccb5574b 100644 --- a/templates/vars/applications.yml.j2 +++ b/templates/vars/applications.yml.j2 @@ -121,7 +121,7 @@ defaults_applications: {% endraw %}{{ features.render_features({ 'matomo': true, 'css': true, - 'iframe': true, + 'iframe': false, 'oidc': true, 'database': true, }) }}{% raw %}