commit 9c2ca948389942c2ec2f49da264ecaa6ebe8d6d7
parent ac1340e2556573288bdcaa9e892475f342de24fa
Author: MTRNord <MTRNord@users.noreply.github.com>
Date: Tue, 14 Oct 2025 22:14:46 +0200
meow
Signed-off-by: MTRNord <MTRNord@users.noreply.github.com>
Diffstat:
7 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/apps/talos_cluster/blog/docker/Dockerfile b/apps/talos_cluster/blog/docker/Dockerfile
@@ -33,6 +33,10 @@ RUN rm /etc/nginx/sites-enabled/default
ADD wordpress.conf /etc/nginx/sites-available/
RUN ln -s /etc/nginx/sites-available/wordpress.conf /etc/nginx/sites-enabled/
+COPY wellknown/client.json /var/www/html/well-known/client
+COPY wellknown/server.json /var/www/html/well-known/server
+COPY wellknown/support.json /var/www/html/well-known/support.json
+
# Add WordPress config file
RUN rm /var/www/html/wordpress/wp-config-sample.php
ADD wp-config.php /var/www/html/wordpress/wp-config.php
@@ -40,6 +44,8 @@ ADD wp-config.php /var/www/html/wordpress/wp-config.php
# Change the user and Permission of WordPress root directory
RUN chown -R www-data:www-data /var/www/html/wordpress \
&& chmod -R 755 /var/www/html/wordpress
+RUN chown -R www-data:www-data /var/www/html/well-known \
+ && chmod -R 755 /var/www/html/well-known
# Exposing container to port 8080
EXPOSE 8080
diff --git a/apps/talos_cluster/blog/docker/wellknown/client.json b/apps/talos_cluster/blog/docker/wellknown/client.json
@@ -0,0 +1,5 @@
+{
+ "m.homeserver": {
+ "base_url": "https://matrix.mtrnord.blog"
+ }
+}
diff --git a/apps/talos_cluster/blog/docker/wellknown/server.json b/apps/talos_cluster/blog/docker/wellknown/server.json
@@ -0,0 +1,3 @@
+{
+ "m.server": "matrix.mtrnord.blog:443"
+}
diff --git a/apps/talos_cluster/blog/docker/wellknown/support.json b/apps/talos_cluster/blog/docker/wellknown/support.json
@@ -0,0 +1,8 @@
+{
+ "contacts": [
+ {
+ "email_address": "support@midnightthoughts.space",
+ "role": "m.role.admin"
+ }
+ ]
+}
diff --git a/apps/talos_cluster/blog/docker/wordpress.conf b/apps/talos_cluster/blog/docker/wordpress.conf
@@ -5,6 +5,14 @@ server {
server_name _;
+ location /.well-known/matrix {
+ alias /var/www/html/well-known/;
+ default_type application/json;
+ types { }
+ add_header Content-Type application/json;
+ try_files $uri $uri.json =404;
+ }
+
location = /favicon.ico {
log_not_found off;
access_log off;
diff --git a/apps/talos_cluster/blog/docker/wp-config.php b/apps/talos_cluster/blog/docker/wp-config.php
@@ -59,6 +59,11 @@ define( 'WP_DEBUG', false );
/* Add any custom values between this line and the "stop editing" line. */
+if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
+ $_SERVER['HTTPS'] = 'on';
+}
+define('WP_HOME', 'https://mtrnord.blog');
+define('WP_SITEURL', 'https://mtrnord.blog');
/* That's all, stop editing! Happy publishing. */
diff --git a/apps/talos_cluster/blog/wordpress.yaml b/apps/talos_cluster/blog/wordpress.yaml
@@ -102,6 +102,13 @@ spec:
volumeMounts:
- name: wordpress-persistent-storage
mountPath: /var/www/html/wordpress/wp-content/uploads
+ subPath: uploads
+ - name: wordpress-persistent-storage
+ mountPath: /var/www/html/wordpress/wp-content/plugins
+ subPath: plugins
+ - name: wordpress-persistent-storage
+ mountPath: /var/www/html/wordpress/wp-content/themes
+ subPath: themes
readinessProbe:
httpGet:
path: /wp-login.php