From 80e05de92a67ab52cd7b1ac3ca79d136a7de7e13 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Wed, 16 Mar 2022 17:21:56 +0300 Subject: [PATCH] Element Web (#19) Solves #18. Reviewed-on: https://git.skobk.in/skobkin/docker-stacks/pulls/19 --- README.md | 1 + element-web/.env.dist | 8 +++++ element-web/README.md | 8 +++++ element-web/config/.gitignore | 3 ++ element-web/config/config.json.dist | 54 +++++++++++++++++++++++++++++ element-web/docker-compose.yml | 19 ++++++++++ element-web/nginx/element.conf | 22 ++++++++++++ 7 files changed, 115 insertions(+) create mode 100644 element-web/.env.dist create mode 100644 element-web/README.md create mode 100644 element-web/config/.gitignore create mode 100644 element-web/config/config.json.dist 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..40ac4ef 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 | ✅ | `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/README.md b/element-web/README.md new file mode 100644 index 0000000..e587e72 --- /dev/null +++ b/element-web/README.md @@ -0,0 +1,8 @@ +# Configuration + +```shell +cp config/config.json.dist config/config.json +``` + +Then edit your config.json according to your needs. See +[this](https://github.com/vector-im/element-web/blob/develop/docs/config.md) for more info. \ 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/config/config.json.dist b/element-web/config/config.json.dist new file mode 100644 index 0000000..9499ed3 --- /dev/null +++ b/element-web/config/config.json.dist @@ -0,0 +1,54 @@ +{ + "default_server_config": { + "m.homeserver": { + "base_url": "https://matrix-client.matrix.org", + "server_name": "matrix.org" + }, + "m.identity_server": { + "base_url": "https://vector.im" + } + }, + "disable_custom_urls": false, + "disable_guests": false, + "disable_login_language_selector": false, + "disable_3pid_login": false, + "brand": "Element", + "integrations_ui_url": "https://scalar.vector.im/", + "integrations_rest_url": "https://scalar.vector.im/api", + "integrations_widgets_urls": [ + "https://scalar.vector.im/_matrix/integrations/v1", + "https://scalar.vector.im/api", + "https://scalar-staging.vector.im/_matrix/integrations/v1", + "https://scalar-staging.vector.im/api", + "https://scalar-staging.riot.im/scalar/api" + ], + "bug_report_endpoint_url": "https://element.io/bugreports/submit", + "uisi_autorageshake_app": "element-auto-uisi", + "defaultCountryCode": "GB", + "showLabsSettings": false, + "features": { }, + "default_federate": true, + "default_theme": "light", + "roomDirectory": { + "servers": [ + "matrix.org" + ] + }, + "piwik": { + "url": "https://piwik.riot.im/", + "whitelistedHSUrls": ["https://matrix.org"], + "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], + "siteId": 1 + }, + "enable_presence_by_hs_url": { + "https://matrix.org": false, + "https://matrix-client.matrix.org": false + }, + "settingDefaults": { + "breadcrumbs": true + }, + "jitsi": { + "preferredDomain": "meet.element.io" + }, + "map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx" +} \ 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..0aac962 --- /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..e3dd7f5 --- /dev/null +++ b/element-web/nginx/element.conf @@ -0,0 +1,22 @@ +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 / { + 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