From 1f0217a4184af6df70180094277a73ef115b6a81 Mon Sep 17 00:00:00 2001 From: Viyurz <128215328+Viyurz@users.noreply.github.com> Date: Mon, 11 Dec 2023 14:40:29 +0100 Subject: [PATCH] Add element web --- element/config.json | 3 +++ element/docker-compose.yaml | 9 +++++++++ nginx-rp/reverse-proxy.conf | 23 +++++++++++++++++++++++ ports.txt | 1 + update.sh | 7 ++++++- 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 element/config.json create mode 100644 element/docker-compose.yaml diff --git a/element/config.json b/element/config.json new file mode 100644 index 0000000..ac8ef5b --- /dev/null +++ b/element/config.json @@ -0,0 +1,3 @@ +{ + "default_server_name": "viyurz.fr" +} diff --git a/element/docker-compose.yaml b/element/docker-compose.yaml new file mode 100644 index 0000000..603ca9d --- /dev/null +++ b/element/docker-compose.yaml @@ -0,0 +1,9 @@ +services: + element: + container_name: element + image: vectorim/element-web:latest + restart: always + ports: + - "[::1]:8084:80" + volumes: + - ./config.json:/app/config.json diff --git a/nginx-rp/reverse-proxy.conf b/nginx-rp/reverse-proxy.conf index 1ff78f6..813a7e6 100644 --- a/nginx-rp/reverse-proxy.conf +++ b/nginx-rp/reverse-proxy.conf @@ -150,6 +150,29 @@ server { +# Element +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + + server_name element.viyurz.fr; + + location / { + proxy_pass http://localhost:8084; + + add_header X-Frame-Options SAMEORIGIN; + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header Content-Security-Policy "frame-ancestors 'none'"; + + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; + add_header X-Robots-Tag "noindex, nofollow" always; + add_header Set-Cookie "Path=/; HttpOnly; Secure"; + } +} + + + # Homepage server { listen 443 ssl http2; diff --git a/ports.txt b/ports.txt index f9c6ed8..7411685 100644 --- a/ports.txt +++ b/ports.txt @@ -9,6 +9,7 @@ 8081 -> Vaultwarden 8082 -> nginx-www 8083 -> SearXNG +8084 -> element-web 8384 -> Syncthing Web UI 8443 -> stdisco 11000 -> Nextcloud diff --git a/update.sh b/update.sh index 71ad48f..75e4b88 100755 --- a/update.sh +++ b/update.sh @@ -1,7 +1,7 @@ #!/bin/bash -services=(coturn etebase nginx-www searxng synapse syncthing vw) +services=(coturn element etebase nginx-www searxng synapse syncthing vw) rel_path="$(dirname "$0")" @@ -19,6 +19,11 @@ function coturn_update { } +function element_update { + compose_up element +} + + function etebase_update { if ! docker pull victorrds/etebase:alpine | grep -q 'Image is up to date' ; then echo "Update available for etebase."