diff --git a/aosus-wordpress/custom.ini b/aosus-wordpress/custom.ini new file mode 100644 index 0000000..5f31c50 --- /dev/null +++ b/aosus-wordpress/custom.ini @@ -0,0 +1,5 @@ +file_uploads = On +memory_limit = 256M +upload_max_filesize = 64M +post_max_size = 64M +max_execution_time = 600 \ No newline at end of file diff --git a/aosus-wordpress/docker-compose.yml b/aosus-wordpress/docker-compose.yml new file mode 100644 index 0000000..c3216f3 --- /dev/null +++ b/aosus-wordpress/docker-compose.yml @@ -0,0 +1,46 @@ +networks: + default: + enable_ipv6: true + web: + external: true + +services: + wordpress: + image: wordpress:6.6.2-apache@sha256:808d11c13cd0dec746a737e5f717a6b43f470ef197452657df1e71a163e6979e + container_name: aosus-wordpress + restart: always + environment: + WORDPRESS_DB_HOST: mariadb + WORDPRESS_DB_USER: aosusworddb + WORDPRESS_DB_NAME: wordpress + WORDPRESS_DB_PASSWORD: (aosus_wordpress_mariadb_password) + # WORDPRESS_DEBUG: true + networks: + default: + web: + volumes: + - html:/var/www/html:rw + configs: + - source: custom-ini + target: /usr/local/etc/php/conf.d/custom.ini + + mariadb: + image: mariadb:11.5.2@sha256:4a1de8fa2a929944373d7421105500ff6f889ce90dcb883fbb2fdb070e4d427e + restart: always + environment: + MARIADB_USER: aosusworddb + MARIADB_DATABASE: wordpress + MARIADB_PASSWORD: (aosus_wordpress_mariadb_password) + MARIADB_AUTO_UPGRADE: true + #MARIADB_RANDOM_ROOT_PASSWORD: '1' + MARIADB_ROOT_PASSWORD: (aosus_wordpress_mariadb_root_password) + volumes: + - mariadb:/var/lib/mysql + +volumes: + mariadb: + html: + +configs: + custom-ini: + file: /home/aosus/aosus-wordpress/custom.ini diff --git a/caddy/configs/aosus-wordpress.caddyfile b/caddy/configs/aosus-wordpress.caddyfile new file mode 100644 index 0000000..2ab8cc2 --- /dev/null +++ b/caddy/configs/aosus-wordpress.caddyfile @@ -0,0 +1,22 @@ +aosus.org { + header { + Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" + } + handle_errors { + # handle_errors is only triggerd on erros from Caddy and not the proxy, that's why we don't specifiy any errors here. + rewrite * /proxy_error_page.html + file_server { + root /srv/ + } + } + # https://matrix-org.github.io/synapse/latest/reverse_proxy.html#caddy-v2 + header /.well-known/matrix/* Content-Type application/json + header /.well-known/matrix/* Access-Control-Allow-Origin * + respond /.well-known/matrix/server `{"m.server": "matrix.aosus.org:443"}` + # add sliding sync availability (https://github.com/matrix-org/sliding-sync) + respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://matrix.aosus.org:443"},"org.matrix.msc3575.proxy":{"url":"https://syncv3-matrix-proxy.aosus.org"}}` + # redirect old links + redir /t/* https://discourse.aosus.org{uri} permanent + reverse_proxy aosus-wordpress:80 + encode zstd gzip +}