Skip to content

Commit

Permalink
add aosus.org
Browse files Browse the repository at this point in the history
  • Loading branch information
FarisZR committed Oct 21, 2024
1 parent 54789a5 commit 46c83b8
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aosus-wordpress/custom.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
file_uploads = On
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600
46 changes: 46 additions & 0 deletions aosus-wordpress/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions caddy/configs/aosus-wordpress.caddyfile
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 46c83b8

Please sign in to comment.