From b9bf93ababa54fd984c831adea7f221603a57a49 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 16 Mar 2022 16:25:32 +0300 Subject: [PATCH] element-web. draft. --- README.md | 1 + element-web/.env.dist | 8 ++++++++ element-web/config/.gitignore | 3 +++ element-web/docker-compose.yml | 19 +++++++++++++++++++ element-web/nginx/element.conf | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 element-web/.env.dist create mode 100644 element-web/config/.gitignore create mode 100644 element-web/docker-compose.yml create mode 100644 element-web/nginx/element.conf diff --git a/README.md b/README.md index 674057e..6a11f17 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Not every stack is tested to fully work. |-------------------------|--------------|----------------------------------------------|----------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ARK Server | ✅ | `thmhoag/arkserver` | ARK: Survival Evolved game server with ArkManager. | [Website](http://playark.com), [Steam](https://store.steampowered.com/app/346110/ARK_Survival_Evolved/), [Image Github](https://github.com/thmhoag/arkserver), [ArkManager](https://github.com/arkmanager/ark-server-tools) | | Duplicati | ✅ | `linuxserver/duplicati` | Backup solution with many storage backends. | [Website](https://www.duplicati.com), [Github](https://github.com/duplicati/duplicati) | +| Element-web | Not tested | `vectorim/element-web` | Web Matrix client. | [Website](https://element.io), [Github](https://github.com/vector-im/element-web/) | | Folding@Home | ✅ | `johnktims/folding-at-home` | Protein folding distributed computing platform. | [Website](https://foldingathome.org), [My guide](https://skobk.in/2020/06/folding-at-home-quick-start/) | | Gatus | ✅ | `twinproduction/gatus` | Advanced service(s) status page. | [Website](https://gatus.io), [Github](https://github.com/TwiN/gatus) | | Gitea | ✅ | `gitea/gitea` | Lightweight Git hosting platfom. | [Website](https://gitea.io/), [Github](https://github.com/go-gitea/gitea) | diff --git a/element-web/.env.dist b/element-web/.env.dist new file mode 100644 index 0000000..c1846ac --- /dev/null +++ b/element-web/.env.dist @@ -0,0 +1,8 @@ +# see https://hub.docker.com/r/vectorim/element-web +HOST_USER=0 + +WEBUI_BIND_ADDR=127.0.0.1 +WEBUI_BIND_PORT=8385 + +LOG_MAX_SIZE=5m +LOG_MAX_FILE=5 \ No newline at end of file diff --git a/element-web/config/.gitignore b/element-web/config/.gitignore new file mode 100644 index 0000000..cbd6898 --- /dev/null +++ b/element-web/config/.gitignore @@ -0,0 +1,3 @@ +/* +!/.gitignore +!/config.json.dist \ No newline at end of file diff --git a/element-web/docker-compose.yml b/element-web/docker-compose.yml new file mode 100644 index 0000000..24fcf79 --- /dev/null +++ b/element-web/docker-compose.yml @@ -0,0 +1,19 @@ +# https://hub.docker.com/r/vectorim/element-web +version: '3.7' + +services: + element-web: + image: vectorim/element-web + container_name: element-web + #volumes: + # - "./config/config.json:/app/config.json" + ports: + - "${WEBUI_BIND_ADDR}:${WEBUI_BIND_PORT}:80" + env_file: .env + restart: unless-stopped + user: "${HOST_USER:-0}" + logging: + driver: "json-file" + options: + max-size: "${LOG_MAX_SIZE:-5m}" + max-file: "${LOG_MAX_FILE:-5}" diff --git a/element-web/nginx/element.conf b/element-web/nginx/element.conf new file mode 100644 index 0000000..d443760 --- /dev/null +++ b/element-web/nginx/element.conf @@ -0,0 +1,33 @@ +server { + listen 80; + server_name syncthing.domain.tld; + + #charset utf-8; + + # see https://github.com/vector-im/element-web/blob/develop/nginx/conf.d/default.conf + location / { + location = /index.html { + add_header Cache-Control "no-cache"; + } + location = /version { + add_header Cache-Control "no-cache"; + } + # covers config.json and config.hostname.json requests as it is prefix. + location /config { + add_header Cache-Control "no-cache"; + } + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_read_timeout 600s; + proxy_send_timeout 600s; + + proxy_pass http://127.0.0.1:8385/; + } + + # redirect server error pages to the static page /50x.html + error_page 500 502 503 504 /50x.html; +} \ No newline at end of file