Restructure and cleaned up in preparation of new backup logic

This commit is contained in:
2025-07-15 23:51:51 +02:00
parent c8054ffbc3
commit af3ea9039c
106 changed files with 703 additions and 429 deletions

View File

@@ -1,7 +1,7 @@
title: "Blog" # Wordpress titel
plugins:
wp-discourse:
enabled: "{{ 'discourse' in group_names | lower }}"
enabled: "{{ 'web-app-discourse' in group_names | lower }}"
daggerhart-openid-connect-generic:
enabled: true
activitypub:
@@ -12,7 +12,6 @@ features:
port-ui-desktop: true
oidc: true
central_database: true
version: latest
csp:
flags:
style-src:
@@ -42,7 +41,14 @@ domains:
docker:
services:
database:
enabled: true
enabled: true
wordpress:
version: latest
image: wordpress
name: wordpress
no_stop_required: true
volumes:
data: wordpress_data
rbac:
roles:
subscriber:

View File

@@ -5,14 +5,14 @@
- name: Wait for Discourse API
wait_for:
host: "{{ domains | get_domain('discourse') }}"
host: "{{ domains | get_domain('web-app-discourse') }}"
port: 80
delay: 5
timeout: 600
- name: Add /var/www/discourse to Git safe.directory
command: >
docker exec {{ applications.discourse.container }} \
docker exec {{ applications['web-app-discourse'].docker.service.discourse.name }} \
git config --global --add safe.directory /var/www/discourse
args:
chdir: "{{ docker_compose.directories.instance }}"
@@ -20,7 +20,7 @@
- name: Revoke old WP Discourse API keys via Rails
command: >
docker exec {{ applications.discourse.container }} bash -lc "\
docker exec {{ applications['web-app-discourse'].docker.service.discourse.name }} bash -lc "\
cd /var/www/discourse && \
script/rails runner \"\
ApiKey.where(\
@@ -36,7 +36,7 @@
- name: Generate new WP Discourse API key via Rake task
command: >
docker exec {{ applications.discourse.container }} bash -lc "\
docker exec {{ applications['web-app-discourse'].docker.service.discourse.name }} bash -lc "\
cd /var/www/discourse && \
bin/rake api_key:create_master['WP Discourse Integration']\
"

View File

@@ -1,4 +1,4 @@
FROM wordpress:{{applications | get_app_conf(application_id, 'version', True)}}
FROM {{ wordpress_image }}:{{ wordpress_version }}
# Install msmtp and update system
RUN apt-get update && \

View File

@@ -1,8 +1,8 @@
{% include 'roles/docker-compose/templates/base.yml.j2' %}
application:
{% include 'roles/docker-container/templates/base.yml.j2' %}
image: {{wordpress_custom_image}}
container_name: wordpress-application
image: {{ wordpress_custom_image }}
container_name: {{ wordpress_name }}
build:
context: .
ports:
@@ -18,3 +18,4 @@
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
data:
name: "{{ wordpress_volume }}"

View File

@@ -11,7 +11,7 @@ discourse_settings:
- name: discourse_connect
key: url
value: "{{ domains | get_url('discourse', web_protocol) }}"
value: "{{ domains | get_url('web-app-discourse', web_protocol) }}"
- name: discourse_connect
key: api-key
value: "{{ vault_discourse_api_key }}"

View File

@@ -1,6 +1,10 @@
application_id: "wordpress"
wordpress_max_upload_size: "64M"
application_id: "web-app-wordpress"
database_type: "mariadb"
host_msmtp_conf: "{{docker_compose.directories.config}}msmtprc.conf"
wordpress_max_upload_size: "64M"
wordpress_custom_image: "wordpress_custom"
wordpress_docker_html_path: "/var/www/html"
host_msmtp_conf: "{{docker_compose.directories.config}}msmtprc.conf"
wordpress_version: "{{ applications | get_app_conf(application_id, 'docker.services.wordpress.version', True) }}"
wordpress_image: "{{ applications | get_app_conf(application_id, 'docker.services.wordpress.image', True) }}"
wordpress_name: "{{ applications | get_app_conf(application_id, 'docker.services.wordpress.name', True) }}"
wordpress_volume: "{{ applications | get_app_conf(application_id, 'docker.services.volumes.data', True) }}"