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).pull/3446/head
| @@ -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" | matrix_client_cinny_container_image_self_build_repo: "https://github.com/ajbura/cinny.git" | ||||
| # renovate: datasource=docker depName=ajbura/cinny | # 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: "{{ 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_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') }}" | matrix_client_cinny_docker_image_force_pull: "{{ matrix_client_cinny_docker_image.endswith(':latest') }}" | ||||
| @@ -51,16 +51,20 @@ http { | |||||
| root /usr/share/nginx/html; | root /usr/share/nginx/html; | ||||
| location / { | location / { | ||||
| index index.html index.htm; | |||||
| } | |||||
| location ~* ^/(config(.+)?\.json$|(.+)\.html$|i18n) { | |||||
| expires -1; | |||||
| } | |||||
| # Inspired by: https://raw.githubusercontent.com/cinnyapp/cinny/dev/docker-nginx.conf | |||||
| error_page 500 502 503 504 /50x.html; | |||||
| location = /50x.html { | |||||
| root /usr/share/nginx/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; | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||