1
0
mirror of https://github.com/spantaleev/matrix-docker-ansible-deploy.git synced 2024-12-12 08:43:55 +02:00

Upgrade Cinny (v3.2.0 -> v4.0.0) and adapt our custom nginx configuration with the new URL rewrites

Cinny includes nginx configuration which does URL rewrites now, as seen
here: https://raw.githubusercontent.com/cinnyapp/cinny/dev/docker-nginx.conf

That said, we have our own nginx configuration for Cinny, because we'd
like to run ngin as non-root and on a non-privileged port (80 -> 8080).

For this reason, we override `/etc/nginx/nginx.conf` and need to
duplicate what we see in `/etc/nginx/conf.d/default.conf` with our own
`server` block (which listens on port 8080).
This commit is contained in:
Slavi Pantaleev 2024-07-24 21:49:26 +03:00
parent ded398bf44
commit 57eeb1be33
2 changed files with 13 additions and 9 deletions

View File

@ -7,7 +7,7 @@ matrix_client_cinny_container_image_self_build: false
matrix_client_cinny_container_image_self_build_repo: "https://github.com/ajbura/cinny.git"
# renovate: datasource=docker depName=ajbura/cinny
matrix_client_cinny_version: v3.2.0
matrix_client_cinny_version: v4.0.0
matrix_client_cinny_docker_image: "{{ matrix_client_cinny_docker_image_name_prefix }}ajbura/cinny:{{ matrix_client_cinny_version }}"
matrix_client_cinny_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_cinny_container_image_self_build else matrix_container_global_registry_prefix }}"
matrix_client_cinny_docker_image_force_pull: "{{ matrix_client_cinny_docker_image.endswith(':latest') }}"

View File

@ -51,16 +51,20 @@ http {
root /usr/share/nginx/html;
location / {
index index.html index.htm;
}
# Inspired by: https://raw.githubusercontent.com/cinnyapp/cinny/dev/docker-nginx.conf
location ~* ^/(config(.+)?\.json$|(.+)\.html$|i18n) {
expires -1;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
rewrite ^/config.json$ /config.json break;
rewrite ^/manifest.json$ /manifest.json break;
rewrite ^.*/olm.wasm$ /olm.wasm break;
rewrite ^/pdf.worker.min.js$ /pdf.worker.min.js break;
rewrite ^/public/(.*)$ /public/$1 break;
rewrite ^/assets/(.*)$ /assets/$1 break;
rewrite ^(.+)$ /index.html break;
}
}
}